WSO2 human task goes to COMPLETED state but calling BPEL process remains in ACTIVE state - wso2

I have created WSO2 human task as per the guidelines mentioned in link (http://docs.wso2.org/display/BPS300/Writing+a+Human+Task+Artifact).
I am calling human task from Asynchronous BPEL process, once human task get completed it proceeds further with other BPEL Activities and callback client.
I am facing an issue i.e. Human task goes to COMPLETED task state but my BPEL Process which is calling that human task is not proceeding further from REMOTE TASK Activity to next BPEL activity and it remains in ACTIVE state.
Please suggest what needs to be done for that, do I need to use BPEL correlation for that, If yes then how do I implement co-relation in human task activity.

No. you don't need to use BPEL correlation in BPEL process for Remote Task. B4P extension correlates BPEL instance and Task instance internally. For this B4P extension uses a correlation filter in deploy.xml file.
Seems like above part is missing in the documentation. I will update the document. In the meantime can you follow following step to fix it.
1) Open deploy.xml in text/xml editor.
2) Let's say your task's partner link is b4pPartnerLink. Then find provider service for b4pPartnerLink partner link and add correlation filter correlationFilter="b4p:b4pFilter" as follow.
<provide partnerLink="b4pPartnerLink" correlationFilter="b4p:b4pFilter">
<service name="apprv:ClaimServiceCB" port="ClaimPortCB"/>
</provide>
Example : http://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/products/bps/3.1.0/modules/samples/product/src/main/resources/bpel/2.0/ClaimsApprovalProcess/deploy.xml
3) Then Re deploy bpel process.
If the problem still exists, can you please check whether Callback service url is correct in the WSDL.
Thanks ~ hasitha

Related

How to complete a service task using camunda rest api

I am using Camunda workflows to automate various processes. I have come across a scenario where the process is not moving from a service task. Usually, we call the task/{taskid}/complete to complete the task, but since the process is stuck on a service task, I am not able to complete that task. Can anybody help me find a way to complete the service task?
You are using a service task. That basically means "a machine should do something". The "normal" implementation is to provide code (a java Delegate or a connector endpoint) that is called by the process engine to execute this task.
The alternativ is to use the "external task" pattern. Think of external tasks as "user tasks for computers". So the process waits, tells subscribed clients that a job is to be done and waits for their completion.
I suppose your process uses the second option? (you can check in the modeler under "Implementation"). So completion can be done through the external task API, see docs.
/external-task/{id}/complete
If it is a connector then you likely will see when checking the log that retries have occurred and that the transaction rolled back. After addressing the underlying issue the service task (email) should be sent without explicitly triggering the service task and the following user task (Approval) should be created.

Fetching currently executing tasks for a flow

We just started with camunda and looking for api which can give us all tasks which are currently getting executed. I know that it does provide state information like PENDING and COMPLETED but I am particularly interested in "EXECUTING" state. Is there a way to find it? Is it safe to assume that if task is not in COMPLETED/ERROR and PENDING state, then it is getting executed?
note: using camunda 7.9.0 - Jboss packaging
Assuming that you are talking about user tasks, the safest way is to perform a claim() on the task when a user starts working.
Then you can assume that every task that has an assignee is currently being worked on.

Camunda Process Modification after process instance has completed

Can a COMPLETED process be modified using cockpit in enterprise version of Camunda such that it is brought back to its last stage (stage just before completion)?
Note that community version is being evaluated using REST API and condition is that the processInstanceId should not change.
The reason for asking this question is after Camunda has successfully finished processing as per work-flow and now is responding to the caller using REST API and suddenly there is a network outage, so in this special case, Camunda and the caller's respository shall be out of sync.
The closest you can get to this is the POST /process-definition/{id}/restart API. However, it does not restore the process instance with the same id.
Links:
https://docs.camunda.org/manual/7.7/reference/rest/process-definition/post-restart-process-instance-sync/
https://docs.camunda.org/manual/7.7/user-guide/process-engine/process-instance-restart

WSO2 BPS 3.2 human task assignment to multiple people Via expressions e.g., by retrieving data from the input message of the human task

I have create wso2 human task where the approval has to be given by multiple owners in parallely. I am calling human task from Synchronous BPEL process. I am able to upload the Process and task packages successfully. But only one potential owner get approval not others.This link said BPS 3.2.0 Routing Patterns are not supported.WSO2 BPS 3.2 human task assignment to multiple people creating Process in failed status
So I put this this in my code.
<htd:potentialOwners> <htd:from>htd:getInput("ClaimApprovalRequest")/test10:UserList/test10:ME</htd:from>
</htd:potentialOwners>
<htd:potentialOwners> <htd:from>htd:getInput("ClaimApprovalRequest")/test10:UserList/test10:HBR</htd:from>
</htd:potentialOwners>
''
Any idea what is going wrong here. As the task creation is working fine.
To clarify what you are doing now: when you assign to potentialOwners, that means that any one of the people in that group can complete the task. That is not the same as: all people have to carry out the task.
What you probably want, is:
<htd:potentialOwners><htd:parallel type="all">...owners...</htd:parallel><htd:potentialOwners>
I do not know if WSO2 supports that though.

aws swf - get workflow execution id from within the workflow

I am using Amazon SWF service to automate some recurring tasks.
I am trying to use signals to execute some commands on remote machines. After the commands are finished executing, I'd like to send a signal back to the workflow to indicate success or failure.
The question is how can I find the workflow execution id programmatically? This is required for the remote machines to send a signal.
Thanks
Per http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/SimpleWorkflow/WorkflowExecution.html, shouldn't
your_workflow_execution_variable.run_id
get you exactly what you're looking for?