cancel
Showing results for 
Search instead for 
Did you mean: 

Custom humanPerformer

mir
Champ in-the-making
Champ in-the-making
Greetings,
I came across this issue while developing a custom workflow with Activiti: there are two assignees in that workflow, first one being bpm:assignee and the second one being, say, mywf:assignee2; it is declared through an aspect in myWorkflowModel. They are in charge of a task each in the workflow definition, and syntax looks fine and all, yet I'm unable to transition to the second task, the assignee2's; a javascript error pops up and goes "org.activiti.engine.ActivitiException: Unknown property used in expression" after I click the transition that leads to that task. Now, I've tried everything that came to my mind, from entirely redeploying the workflow to renaming the aspect in question (I know, right), and that included giving bpm:assignee the task instead of mywf:assignee2. Lo and behold, doing that eliminated the error, but was kind of irrelevant since that task should go to the other guy.
So I reckon the workflow definition doesnt recognize the aspect (before you ask, it is included in the workflowModel), or syntax should be different for custom aspects there (unlikely, huh - I double checked workflowModel, aspect still there), or something else - I'm kind of out of options that make any sense to me at all, thus I'm asking for help here. I could route that assignment property through bpm:assignee, I guess, but that just feels unnatural.

I'd appreciate your input on this.
6 REPLIES 6

amandaluniz_z
Champ on-the-rise
Champ on-the-rise
Doesn't it say which is the unknown property?

mir
Champ in-the-making
Champ in-the-making
Doesn't it say which is the unknown property?
Nope, unfortunately. I'm pretty sure its the mywf_assignee2, since replacing it with bpm_assignee removes the error; it isnt really a solution though. The error message I provided is the entirety of what I'm seeing.

amandaluniz_z
Champ on-the-rise
Champ on-the-rise
can you post the workflow's xml file in here as well as the workflow model?

Thanks,
Adei

mir
Champ in-the-making
Champ in-the-making
workflowModel: http://paste2.org/p/1914557
process: http://paste2.org/p/1914559

Aspect is cntpwf:developer, task where it gets assigned is expertRequestTask, task where it gets used - and where it fails to transition - is developerRequestTask, through flow4.

I'm nowhere nearer solving the problem than I was a couple days ago; kind of bugging me now, cant wait to find out I still missed some kind of typo through all the checks I did.

amandaluniz_z
Champ on-the-rise
Champ on-the-rise
I guess you have already changed this, right?

From:
<formalExpression>${cntpwf_developer}</formalExpression>

To:
<formalExpression>${cntpwf_developer.properties.userName}</formalExpression>

That is in line 158

mir
Champ in-the-making
Champ in-the-making
Yeah, had .properties.userName there for a while, changed it when desperately trying to make it work.

EDIT: was wrong previously. Eventually solved through adding

<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
   <activiti:field name="script">
      <activiti:string>
         execution.setVariable('mywf_assignee2', task.getVariableLocal ('mywf_assignee2'));
      </activiti:string>
   </activiti:field>
</activiti:taskListener>
to the node that assigned the assignee2.

This subject somewhat freaks me out with how little consistency it has been presenting; hopefully this fixes it once and for all.