05-21-2009 12:04 AM
06-19-2009 03:29 PM
String recipient = (String) executionContext.getVariable(ExternalReviewNotification.RECIP_PROCESS_VARIABLE);
StringBuffer sb = new StringBuffer();
sb.append("You have been assigned to a task named ");
sb.append(executionContext.getToken().getNode().getName());
sb.append(". Take the appropriate action by clicking one of the links below:\r\n\r\n");
List transitionList = executionContext.getNode().getLeavingTransitions();
for (Iterator it = transitionList.iterator(); it.hasNext(); ) {
Transition transition = (Transition)it.next();
sb.append(transition.getName());
sb.append("\r\n");
sb.append("http://localhost:8080/alfresco/service/someco/bpm/review?id=jbpm$");
sb.append(executionContext.getProcessInstance().getId());
sb.append("-@");
sb.append("&action=");
sb.append(transition.getName());
sb.append("&guest=true");
sb.append("\r\n\r\n");
}
07-13-2009 03:27 AM
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wcmwf:submitcustom">
<swimlane name="initiator"/>
<start-state name="start">
<task name="wcmwf:submitReviewTask" swimlane="initiator"/>
<transition name="" to="validation"/>
</start-state>
<task-node name="validation">
<event type="node-enter">
<script>
<variable name="wcmwf_reviewCycle" access="write"/>
<variable name="wcmwf_reviewerCnt" access="write"/>
<variable name="wcmwf_approveCnt" access="write"/>
<variable name="wcmwf_reviewType" access="write"/>
<expression>
wcmwf_reviewCycle = 1;
wcmwf_reviewerCnt = bpm_assignees.size();
wcmwf_approveCnt = 0;
wcmwf_reviewType = wcmwf_submitReviewType;
</expression>
</script>
<action class="com.sample.action.ValidateActionHandler" name="submit"></action>
</event>
<transition name="proceed" to="initialise"/>
</task-node>
…..
…..
</process-definition>
public class ValidateActionHandler extends JBPMSpringActionHandler {
private WorkflowService workflowService;
@Override
protected void initialiseHandler(BeanFactory factory)
{
workflowService = (WorkflowService) factory.getBean(ServiceRegistry.WORKFLOW_SERVICE.getLocalName());
}
public void execute(ExecutionContext executionContext) throws Exception
{
//Inside this method ,I need to get the files submitted to this WF ,so I can get using the taskId like this.
// How can I get the taskId from this executionContext?
List<NodeRef> contents =workflowService.getPackageContents("jbpm$1");
for(int j = 0; j < contents.size(); j++) {
System.out.println("FILES SUBMITTED "+contents.get(j));
}
}
}
07-13-2009 12:10 PM
09-18-2009 09:35 AM
09-22-2009 02:24 PM
09-24-2009 04:03 AM
10-01-2009 04:45 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.