Initiate Workflow programatically --------------------------------- Key: MGNLWORKFLOW-17 URL: http://jira.magnolia-cms.com/browse/MGNLWORKFLOW-17 Project: Magnolia Workflow Module Issue Type: Support Request Components: OpenWFE Affects Versions: 1.0 Environment: Windows 7 with Magnolia 4.5.3 using Mysql as the DB Reporter: SenthilNathan Assignee: Jozef Chocholacek Priority: Critical
We are trying to initiate a worklfow programatically and we have configured a workflow.xml in such a way that once a worklfow is initiate it will automatically publish the item without waiting in the inbox. Please find the xml configuration below <process-definition name="publish" revision="j0.0.2"> <sequence> <set field="activator" field-value="userName"/> <!-- if the last action was proceed: activate--> <activate/> </sequence> <process-definition name="activate"> <sequence> <!-- wait if scheduled --> <if> <defined field-value="startDate"/> <sleep until="${f:startDate}"/> </if> <!-- activate --> <participant ref="command-activate"/> <if> <defined field-value="exception"/> <!-- restart again --> <activation/> <break/> </if> <!-- deactivate (if scheduled)--> <if> <defined field-value="endDate"/> <sequence> <sleep until="${f:endDate}"/> <participant ref="command-deactivate"/> </sequence> </if> </sequence> </process-definition> </process-definition> We are trying to launchItem using the code shown below public static void launchFlow(LaunchItem li, String flowName, boolean isAsync) throws FlowDefinitionException { try { FlowDefinitionManager configurator = WorkflowModule .getFlowDefinitionManager(); configurator.configure(li, flowName); launchFlow(li, isAsync); } catch (Exception e) { LOGGER.error("Launching flow failed in public launchFlow() : ", e); } } The problem here is sometimes the child node is getting published before the parent node and hence we are getting some exception because of this.Is there a way using which I can handle this issue either programatically or using the worklfow config.xml -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.magnolia-cms.com/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ---------------------------------------------------------------- For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <dev-list-unsubscr...@magnolia-cms.com> ----------------------------------------------------------------