This discussion is archived
4 Replies Latest reply: Jun 14, 2013 2:47 AM by SantoshHemashekar RSS

Get Last User Who Actioned a Task in a Swimlane

413057 Newbie
Currently Being Moderated
I have a relatively simple requirement to obtain the last user who completed a human task within a swimlane. I have easily performed this by obtaining the user details from the exec data on the output of the task.

However I also tried to utilise the bpm:getLastPerformer() xpath function. Howeve rthis returns an error.

[2012-11-15T14:30:35.214+00:00] [soa_server1] [ERROR] [] [oracle.soa.services.workflow.task] [tid: orabpel.engine.pool-11.thread-25] [userId: <anonymous>] [ecid: 7b8f00f534776529:-22a2e8e9:13b02fec3de:-8000-000000000000e658,1:30960] [APP: soa-infra] [composite_name: SetupAgencyCBP] [component_name: SetupAgency] [component_instance_id: 910086] [composite_instance_id: 540661] <.> Error in evaluating workflow service XPath extension function.[[
Error in evaluating task service XPath extension function {1}.
Check the error stack and fix the cause of the error.
ORABPEL-30043

Error in evaluating workflow service XPath extension function.
Error in evaluating task service XPath extension function {1}.
Check the error stack and fix the cause of the error.

     at oracle.bpm.bpmn.engine.runtime.xpath.functions.GetLastPerformer.evaluate(GetLastPerformer.java:140)

Caused by: oracle.fabric.common.xml.xpath.XPathFunctionException: Internal Error : getLastPerformer received null BPMN Workflow XPath Context
     at oracle.fabric.common.xml.xpath.XPathFunctionException.fillInStackTrace(XPathFunctionException.java:65)
     at java.lang.Throwable.<init>(Throwable.java:196)
     at java.lang.Exception.<init>(Exception.java:41)
     at oracle.fabric.common.xml.xpath.XPathFunctionException.<init>(XPathFunctionException.java:23)
     at oracle.bpm.bpmn.engine.runtime.xpath.functions.GetLastPerformer.evaluate(GetLastPerformer.java:98)
     ... 75 more


Does anyone know if this works? I attempted to assign the output of this function to a string element. I can find no documentation to illsutrate what the function returns (e.g. An xml document / message for example) or if the function expects paramters to be passed in (Similar to those of the human workflow xpath functions)

FYI I am using 11.1.1.6.0 and have not yet patched to 11.1.1.6.4 (Proposed updgrade shortly). We are also using the integrated Local LDAP

Many Thanks
  • 1. Re: Get Last User Who Actioned a Task in a Swimlane
    Daniel Atwood Oracle ACE
    Currently Being Moderated
    Are you executing the getLastPerformer() method from inside the human task's assignment tab?

    Dan
  • 2. Re: Get Last User Who Actioned a Task in a Swimlane
    413057 Newbie
    Currently Being Moderated
    Hi Dan,

    I was not using the function in the output data association of a human task activity. I was just using this in a scripting task / data association for a separate service call.

    Is it expected to use this on the output data association of a human task. This can then be read from this function to a string data object that can be used for other calls?

    Regards Dave
  • 3. Re: Get Last User Who Actioned a Task in a Swimlane
    Daniel Atwood Oracle ACE
    Currently Being Moderated
    Hi David,

    Not exactly. The only place I've seen getLastPerformer() method invoked successfully is from inside the human task's assignment tab. To see what I'm talking about, determine the human task that is associated with the Interactive activity you want to assign to the previous participant -> in the BPM Project Navigator tab, expand the business catalog -> expand the "Human Tasks" -> double click the human task that is associated with the Interactive activity -> click the "Assignment" tab -> click the person icon in the middle of the page next to the text "default...." -> click the "Edit" pencil button -> in the dropdown beside the text "Build a list of participants using" select "Names and expressions" from the dropdown -> click the plus icon -> click "Add User" -> change the Data Type from "By Name" to "By Expression" -> click the "..." button on the right -> click the dropdown below "Functions" -> click "BPM Functions" -> click "getLastPerformer" -> click "Insert Into Expression" -> click "OK".

    The only place I've seen the previous participant retrieved outside of the human task's assignment tab is when the "getPreviousTaskApprover()" method was invoked. This seems like quite a bit more work, but if you need something invoked from a Script activity - you might try invoking this method. Niall Commiskey has a blog post at http://niallcblogs.blogspot.com/2011/06/pinning-tasks-to-user-in-bpm-11g.html on how to invoke this. Again, seems like double the work, but try this approach if you need it invoked by a Script activity.

    Dan
  • 4. Re: Get Last User Who Actioned a Task in a Swimlane
    SantoshHemashekar Newbie
    Currently Being Moderated

    Hi Dan,

     

    I am still encountering the same error if I use the getLastPerformer() inside the Human Task Assignement tab.

    Please  help me in a  approach to be followed to reroute the task back to previous performer in swimlane role.

     

    Regards,

    Santosh H

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points