Do we have an example of OR split in workflow using a process step instead of an ecma script ?
Do we have an example of OR split in workflow using a process step instead of an ecma script ?
Do we have an example of OR split in workflow using a process step instead of an ecma script ?
Hi @vishwanath881
Unfortunately , I am not able to locate the dependency, I thought It would be part of uber jar.
However, I have also not tried it by myself.
you can try different approach
import com.adobe.granite.workflow.WorkflowException;
import com.adobe.granite.workflow.WorkflowSession;
import com.adobe.granite.workflow.exec.WorkItem;
import com.adobe.granite.workflow.exec.WorkflowData;
import com.adobe.granite.workflow.exec.WorkflowProcess;
public class MyCustomProcessStep implements WorkflowProcess {
@Override
public void execute(WorkItem workItem, WorkflowSession workflowSession, WorkflowData workflowData) throws WorkflowException {
// Your OR split logic here
String condition1 = "your condition 1"; // Replace with your actual conditions
String condition2 = "your condition 2";
if (condition1.equals("true") || condition2.equals("true")) {
// Route the workflow to the appropriate path based on the OR split conditions
workflowSession.complete(workItem, "YOUR_NEXT_WORKFLOW_STEP");
} else {
// Handle the case when neither condition is met
workflowSession.complete(workItem, "ANOTHER_NEXT_WORKFLOW_STEP");
}
}
}
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.