ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 4 replies, has 2 voices, and was last updated by  Rodolfo 1 year, 10 months ago.

  • Creator
    Topic
  • #14859

    Rodolfo
    Participant

    Hi there,

    Please I need some help here. I’m trying to redirect to a specific route or url after some logic inside a process.yml but I’m stuck on this error:

    PropertyAccessor requires a graph of objects or arrays to operate on, but it found type “NULL” while trying to traverse path “result.redirectUrl” at property “redirectUrl”.

    This string is being passed as argument thought this core action/service here: https://github.com/orocrm/platform/blob/ae09ef7175a0febc079b33d7a0b4d2ceab7cbc91/src/Oro/Bundle/WorkflowBundle/Resources/config/actions.yml#L128

    Do I need a $result attribute in my process.yml to make it work?

    This is my redirect. Also tried using route and nothing.

    - @redirect:
    url: 'http://google.com/'

    Do you guys have any clue?
    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #14862
    Dmitry Khrysev
    Dmitry Khrysev
    Oro Core

    Hi, Rodolfo
    Redirect action may be used in scope of workflows, but processes are little bit different, as them may be executed by job queue in cli environment

    #14863

    Rodolfo
    Participant

    Hi @dkhrysev

    Thanks for your reply. My process.yml is being triggered when a new Lead is added. The problem is that depending of the way of the flow inside this process goes, it will remove the lead that was just added. If it remove the lead the final redirection goes to Lead/View it generates a 404 in the web view.

    I can’t put this process on job queue because I need the action executed right away.

    Is there a way to ignore this process.yml on User Interface and only enable it if the Lead is created through RESTApi?

    Thank you so much.

    #14864
    Dmitry Khrysev
    Dmitry Khrysev
    Oro Core

    Possible solution is to add EventListener on kernel.response and handle redirection there dependent on entity existence.

    #14875

    Rodolfo
    Participant

    Hi Dmitry,

    The solution using EventListeners worked.
    Thank you so much!

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.