I tried to deploy the jBPM example which is described in the "Workflow Administration" section of the Wiki.
After completing all the steps, I tried to run the example.
First I tried to start the workflow from the workflow console.
The "show definitions" command gave the following result:
id: jbpm$1 , name: wf:review , title: Review & Approve , version: 1
id: jbpm$5 , name: wf:adhoc , title: Adhoc Task , version: 4
The command "start jbpm$5" gave the following output:
var {}jbpm$5 not found.
The command "start jbpm$1" succeded the first time and I was able to go through the workflow using console command lines.
Afterwards I tried to apply a workflow to a space in the document management UI. I defined a content rule in my home space that starts a workflow when a content is added. I successfully completed all the steps of the content rule wizard. It did not ask me which workflow to apply, but I do not know whether this is normal or not.
Now, when I try to add a content in my home space, the following happens:
- I select the local file and click the Upload button
- I am forwarded to a page which says "'Hello.doc' was uploaded successfully." and shows the following info: "Uploaded Content", "General Properties", "Other Properties". The info is correct.
- I click the "Ok" button and get the following error message:
"Please correct the errors below then click OK.
A system error happened during the operation: Transaction didn't commit: null"
Here is part of the stack trace I get on the server console:
10:09:07,843 ERROR [ActionServiceImpl] An error was encountered whilst executing
the action 'composite-action'.
java.lang.NullPointerException
at org.alfresco.repo.workflow.BPMEngineRegistry.getGlobalIdParts(BPMEngi
neRegistry.java:163)
at org.alfresco.repo.workflow.BPMEngineRegistry.getEngineId(BPMEngineReg
istry.java:179)
at org.alfresco.repo.workflow.WorkflowServiceImpl.getDefinitionByName(Wo
rkflowServiceImpl.java:154)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
…
I had a look at the source code (class BPMEngineRegistry, line 163, method getGlobalIdParts). Here is how the code reads:
161: public static String[] getGlobalIdParts(String globalId)
162: {
163: String[] parts = globalId.split(ID_SEPERATOR_REGEX);
164: if (parts.length != 2)
165: {
166: throw new WorkflowException("Invalid Global Id '" + globalId + "'");
167: }
168: return parts;
169: }
It seems that there is a problem when the method tries to split the globalId. Perhaps, due to the fact that the content rule wizard does not ask for any workflow ID, when the rule is triggered a null is passed as globalID.
On the other hand, if I remove the content rule, upload a file and then explicitely start an advanced workflow using the context menu, everything seem to work.
Does anybody has any clue?
Thanks
Roberto