OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Workflow transition form with custom page template

This topic contains 16 replies, has 3 voices, and was last updated by  Bhavesh Tailor 7 years, 3 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #34175

    adamlundrigan
    Participant

    Here’s what I’m trying to accomplish: I have a custom entity Course with a OneToMany to another custom entity, Registration. The Course has a workflow attached which when transitioned to “Completed” asks the manager to mark each Registration as either “attended” or “absent” (using the approach outlined in the Editable Data Grid cells tutorial), which will then trigger a transition on the workflow of each individual Registration.

    I’ve run into a few roadblocks that I was hoping someone could help me out on or suggest a better way to accomplish the above:

    There doesn’t seem to be a way to add an arbitrary widget to transitionForm.html.twig, so I’ve copied it to my bundle, added my widget, then activated it by setting the page_template attribute on the “complete” transition:

    My Twig-fu is not strong so I may just be missing the right way to extend that template and add the widget to var dataBlocks?

    For now my approach on that works fine. Next step: where do I hook into the form processing so I can read the data from that oro_entity_changeset? The editable grid cells document shows a custom form handler, but WorkflowBundle’s WidgetController has no extension point in it’s form processing action (route: oro_workflow_widget_transition_form). (on further research, maybe a custom transition action is what I should be using here?)

    That brings me to the third question: After tracing the process down through the above to the transition handler this line puzzles me:

    (link). The transition handler completely short-circuits if you’re using a custom page or dialog template. When I press the “submit” button on the transition form it looks like nothing happens, I just stay on (or come back to?) the transition form because the transition handler doesn’t return the transition success response. Is there a separate handler or process for transitions which have their own custom page templates? Can I just override the transition handler and remove the short-circuit?

Viewing 16 replies (of 16 total)
  • Author
    Replies
  • #34191

    Bhavesh Tailor
    Participant

    Hi , Mike Kudelya

    I did create my custom workflow and now it’s work.

    Thank you .


    Bhavesh

Viewing 16 replies (of 16 total)

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

Back to top