Troubleshooting the administration of BPEL processes and human tasks
This article describes how to solve some common problems with BPEL processes and human tasks.
The following information can help you to debug problems with your BPEL processes and human tasks.
Procedure
- The administrative console stops responding if you try to stop a BPEL process application while it still has process instances. Before you try to stop the application, you must stop the BPEL processes so that no new instances are created, and do one of the following:
- Wait for all of the existing process instances to end in an orderly way.
- Terminate and delete all of the process instances.
Only then can you stop the process application safely. For more information about preventing this problem, refer to technote 1166009.
- The administrative console stops responding if you try to stop a human task application while it still has task instances. To stop the application, you must:
- Stop the human tasks so that no new instances are created.
- Perform one of the following:
- Wait for all of the existing task instances to end in an orderly way.
- Terminate and delete all task instances.
- Stop the task application.
- A long-running BPEL process that is started by an invocation task fails to start. A JSP snippet makes the invocation task available to users. In the following example, the synchronous calling pattern createAndCallTask is used. In this case, the long-running BPEL process fails to start:
HumanTaskManager htm = … TaskTemplate taskTemplate = htm.getTaskTemplate( “start the process” ); Task task = htm.createAndCallTask( taskTemplate.getTKTID() ); while (task.getState() != TASK.TASK_STATE_FINISHED) { Sleep(100);}A long-running process consists of several transactions and its invocation style is asynchronous. Therefore it must be started using the asynchronous calling pattern, createAndStartTask.
HumanTaskManager htm = … TaskTemplate taskTemplate = htm.getTaskTemplate( “start the process” ); Task task = htm.createAndStartTask( taskTemplate.getTKTID() ); while (task.getState() != TASK.TASK_STATE_FINISHED) { Sleep(100);}In addition, the transaction attribute in the JSP deployment descriptor must be set to NotSupported. This ensures that the code snippet is executed without a transaction, and the createAndStartTask method opens a new transaction to start the process instance. This transaction is committed when the createAndStartTask method returns, and the message is visible.Include a "while" loop for states other than the finished state.
For example, if during the execution of the process an activity fails, the end state might be TASK.TASK_STATE_FAILED.