Dear experts,
I've developed a workflow which looks like below. [img]workflow.jpg[/img]
I've written two different OSGI bundle for two different custom process step and custom dynamic participant step.
First OSGI implemetation - Created a bundle under /apps/mywebsite/wfprocess/ and path of java file is /apps/mywebsite/wfprocess/src/main/java/com/test/workflow/MyWorkflowProcess.java
@Component
@Service
public class MyWorkflowProcess implements WorkflowProcess {
@Property(value = "An example workflow process implementation.")
static final String DESCRIPTION = Constants.SERVICE_DESCRIPTION;
@Property(value = "Adobe")
static final String VENDOR = Constants.SERVICE_VENDOR;
@Property(value = "Custom Step Process ")
static final String LABEL="process.label";
private static Logger log = LoggerFactory.getLogger(MyWorkflowProcess.class);
private static final String TYPE_JCR_PATH = "JCR_PATH";
public void execute(WorkItem item, WorkflowSession session, MetaDataMap args) throws WorkflowException {
String argument = args.get("PROCESS_ARGS", "default value");
/*
Do I need to do something here to call second dynamic participant step?
/*
}
}
Now second OSGI, Custom Participant- Created a bundle under /apps/mywebsite/custPerticipantChooser/ and path of java file is
/apps/mywebsite/custPerticipantChooser/src/main/java/com/test/cust/actor/MyDynamicParticipant.java
@Component
@Service
@Properties({
@Property(name = Constants.SERVICE_DESCRIPTION, value = "A sample implementation of a dynamic participant chooser."),
@Property(name = Constants.SERVICE_VENDOR, value = "Adobe"),
@Property(name = ParticipantStepChooser.SERVICE_PROPERTY_LABEL, value = "Sample Participant Chooser")})
public class MyDynamicParticipant implements ParticipantStepChooser {
private static final String TYPE_JCR_PATH = "JCR_PATH";
public String getParticipant(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap args) throws WorkflowException {
WorkflowData workflowData = workItem.getWorkflowData();
if (workflowData.getPayloadType().equals(TYPE_JCR_PATH)) {
String path = workflowData.getPayload().toString();
String pathFromArgument = args.get("PROCESS_ARGS", String.class);
if (pathFromArgument != null && path.startsWith(pathFromArgument)) {
return "sam";
}
}
return "marketingrp";
}
}
Now I did install two bundles and both are in active status.
Issue is when I start workflow then first custom process step is getting executed but after it finishes then second custom dynamic participant flow code is not getting executed. But when I removed the first custom step process(Test Process) then code is getting executed for custom dynamic participant flow.
Could you please let me know if I'm missing something here? Thank you for your help!
I'm working on 5.4 version.
Solved! Go to Solution.
On your Process step, is Handler Advance set to true?
http://dev.day.com/docs/en/cq/5-4/administering/working_with_workflows.html#Process%20Step
scott
On your Process step, is Handler Advance set to true?
http://dev.day.com/docs/en/cq/5-4/administering/working_with_workflows.html#Process%20Step
scott
Thanks Scott!, I it worked after setting it to true.
Views
Likes
Replies