Work: After successfully sending the newly created page to inbox, I need to 
activate it automatically.

I am trying this.
After creating the page, launching it successfully to inbox, I have put a sleep 
of 20 secs.

Thread.sleep(20 * 1000); 
Now I am getting the inFlowWorkItem list (list of workitem in inbox), which was 
coming null earlier, as I have increased the sleep period.

InFlowWorkItem list:
List<InFlowWorkItem>  inFlowWorkItems = WorkflowUtil.getWorkItems("superuser");

Now I need to activate the workitems using the code below
for(InFlowWorkItem workItem:inFlowWorkItems){
WorkflowUtil.proceed();
}

I am using WorkflowUtil.proceed() method
I have tried the different overloads of the method

1.      WorkflowUtil.proceed(InFlowWorkItem  inFlowWorkItem);
Problem:
It’s throwing an exception:
Caused by: java.lang.NullPointerException: stackTrace[0]
        at java.lang.Throwable.setStackTrace(Throwable.java:624)
ERROR a.module.admininterface.commands.ActivationCommand: can't activate
javax.jcr.ItemNotFoundException: 840d3c7e-0f94-4450-8b02-3037a0c2f6ed

2.      
WorkflowUtil.proceed(inFlowWorkItem.getId().asStringId(),WorkflowConstants.ACTION_PROCEED);
 
WorkflowUtil.proceed(inFlowWorkItem.getLastExpressionId(),WorkflowConstants.ACTION_PROCEED);
Problem:
Cannot parse FlowExpressionId out of >owfe_1343903401831.0_participant_0.2.0.1< 
(length is 1)

3.      WorkflowUtil.proceed(inFlowWorkItem.getId().asStringId());
Cannot parse FlowExpressionId out of >owfe_1343903401831.0_participant_0.2.0.1< 
(length is 1)

Please inform:
How I will get the flowexpressionid , which the proceed methods take as a 
parameter. Which object gives the id. Do we need to put some logic to parse it?

I have a doubt:
@tatura
InFlowWorkItem workItem = WorkflowUtil.getWorkItem(this.flowItemId);
WorkflowUtil.getWorkItemStore().removeWorkItem(workItem.getId());
In the above line this.flowitemid, “this” is which object and why you are 
removing the workitem?Please describe it a little bit more. Yes I am using 
workflow module only. I will go for auto activation through workflow only.

Team anyone having any idea please help.

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=3c519731-aa88-43b6-9e16-1982a47b664f


----------------------------------------------------------------
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: <[email protected]>
----------------------------------------------------------------

Reply via email to