Hi,
  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

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=16a31133-aec4-48cc-a45f-289789edb08a


----------------------------------------------------------------
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>
----------------------------------------------------------------

Reply via email to