Sitemap

Amicuk Programming Answers

FlowN Problem - tasks are reset before initiaiton

-0001-11-30   Views:0

Advertisement

I'm using flowN to create a number of parallel tasks for a user to work with each element of an array. I'm using the concat() method to generate the correct name and array element for each task. I had to alter the payload information in the user task

I'm using flowN to create a number of parallel tasks for a user to work with each element of an array. I'm using the concat() method to generate the correct name and array element for each task.
I had to alter the payload information in the user task wizard (Jdeveloper BPEL designer) because it won't let me supply the expression to look up individual array elements as part of a payload.
The tasks are all being correctly set up in the setUserDefinedAttributes section of the user task:
<completeSectionVar>
<task>
<title>Complete Section: Evidence of Demand and Overall Marketability of the Course </title>
<assigneeUsers>fkafka</assigneeUsers>
<assigneeGroups/>
<acquiredBy/>
<owner/>
<payload>
<type>mandatory</type>
<name>Evidence of Demand and Overall Marketability of the Course </name>
<description>Marketing information and evidence</description>
<section-help>Market research: competitors, market demand. Projected student numbers, anticipated student entry profiles and employment prospects. Admission/entry qualifications. Marketing plan </section-help>
<section-data/>
</payload>
<conclusion/>
but checking the next step, the SetSystemDefinedAttributes section, all the user tasks generated have been set back to contain the same information - the info from the first node in the array:
<oraBPMTaskMessage>
<part name="payload" >
<task>
<title>Complete Section: Name of Proposed Course</title>
<assigneeUsers>fkafka</assigneeUsers>
<assigneeGroups/>
<acquiredBy/>
<owner/>
<payload>
<type>mandatory</type>
<name>Name of Proposed Course</name>
<description>The name of the proposed course</description>
<section-help/>
<section-data/>
</payload>
<conclusion/>
<state/>
<subState/>
<processId>BPELProcessTestFlowN</processId>
<processName>BPELProcessTestFlowN</processName>
<processVersion>1.1</processVersion>
<instanceId>425</instanceId>
<domainId>default</domainId>
<processOwner>bpeladmin</processOwner>
<taskId/>
<taskNumber/>
<versionNumber/>
<versionReason/>
<taskGroupId/>
I've tried looking at the raw XML format data from the Audit view in BPEL PM, but all I can find is that the FlowN index starts at the highest number and works down. Everything seems to iterate through nicely until the last setting of the first node's task, when there are many settings of variables to the data in the 1st node. I don't know why or what I'm doing wrong here - any help or pointers would be most useful...
FlowN code is as follows:
<bpelx:flowN name="FlowN_1" N="ora:countNodes('getUncompletedSections_getUncompletedSections_OutputVariable','getUncompletedSectionsResponse','/ns1:getUncompletedSectionsResponse/section')" indexVariable="FlowN_1_Variable">
<sequence name="Sequence_3">
<assign name="setXpathVariables">
<copy>
<from expression="concat('/ns1:getUncompletedSectionsResponse/section[', bpws:getVariableData('FlowN_1_Variable'), ']')"/>
<to variable="xpathSection"/>
</copy>
<copy>
<from expression="concat('/ns1:getUncompletedSectionsResponse/section[', bpws:getVariableData('FlowN_1_Variable'), ']/name')"/>
<to variable="xpathSectionName"/>
</copy>
</assign>
<assign name="setName">
<copy>
<from expression="bpws:getVariableData('getUncompletedSections_getUncompletedSections_OutputVariable','getUncompletedSectionsResponse',bpws:getVariableData('xpathSectionName'))"/>
<to variable="name"/>
</copy>
</assign>
<scope name="completeSection" variableAccessSerializable="no" xmlns:taskactionhandler="http://xmlns.oracle.com/pcbpel/taskservice/taskActionHandler" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:taskmngr="http://xmlns.oracle.com/pcbpel/taskservice/taskmanager" xmlns:task="http://xmlns.oracle.com/pcbpel/taskservice/task" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:wf="http://schemas.oracle.com/bpel/extension/workflow" wf:key="completeSectionVar;taskConfigcompleteSection.xml;SimpleUserActivity;Complete Section: &lt;%bpws:getVariableData('name')%&gt;;bpws:getVariableData('getUncompletedSections_getUncompletedSections_OutputVariable', 'getUncompletedSectionsResponse', '/ns1:getUncompletedSectionsResponse/section');;;;;">
<variables>
<variable name="oraBPMTaskMessage" messageType="taskmngr:taskMessage"/>
<variable name="oraBPMTaskErroredFaultMessage" messageType="taskmngr:taskErroredMessage"/>
<variable name="oraBPMTemporaryVariable" type="xsd:string"/>
</variables>
<correlationSets>
<correlationSet name="oraBPMTaskIdCor" properties="taskmngr:taskId"/>
</correlationSets>
<sequence>
<assign name="setUserDefinedAttributes">
<copy>
<from expression="concat(&quot;Complete Section: &quot;,concat('/ns1:getUncompletedSectionsResponse/section[', bpws:getVariableData('FlowN_1_Variable'), ']/name'))"/>
<to variable="completeSectionVar" query="/task:task/task:title"/>
</copy>
<copy>
<from expression="bpws:getVariableData('getUncompletedSections_getUncompletedSections_OutputVariable', 'getUncompletedSectionsResponse', concat('/ns1:getUncompletedSectionsResponse/section[', bpws:getVariableData('FlowN_1_Variable'), ']'))"/>
<to variable="completeSectionVar" query="/task:task/task:payload"/>
</copy>
<copy>
<from expression="string('fkafka')"/>
<to variable="completeSectionVar" query="/task:task/task:assigneeUsers[1]"/>
</copy>
<copy>
<from expression="concat(ora:getProcessURL(), string('/taskConfigcompleteSection.xml'))"/>
<to variable="completeSectionVar" query="/task:task/task:taskType"/>
</copy>
</assign>
<assign name="setSystemDefinedAttributes">
<copy>
<from expression="ora:getInstanceId()"/>
<to variable="completeSectionVar" query="/task:task/task:instanceId"/>
</copy>
<copy>
<from expression="ora:getProcessId()"/>
<to variable="completeSectionVar" query="/task:task/task:processName"/>
</copy>
<copy>
<from expression="ora:getProcessId()"/>
<to variable="completeSectionVar" query="/task:task/task:processId"/>
</copy>
<copy>
<from expression="ora:getProcessVersion()"/>
<to variable="completeSectionVar" query="/task:task/task:processVersion"/>
</copy>
<copy>
<from expression="ora:getDomainId()"/>
<to variable="completeSectionVar" query="/task:task/task:domainId"/>
</copy>
<copy>
<from expression="ora:getProcessOwnerId()"/>
<to variable="completeSectionVar" query="/task:task/task:processOwner"/>
</copy>
<copy>
<from expression="string('SINGLE_APPROVAL')"/>
<to variable="completeSectionVar" query="/task:task/task:pattern"/>
</copy>
<copy>
<from expression="false()"/>
<to variable="completeSectionVar" query="/task:task/task:hasSubTasks"/>
</copy>
<copy>
<from variable="completeSectionVar"/>
<to variable="oraBPMTaskMessage" part="payload"/>
</copy>
</assign>
<scope name="initiateTask">
<faultHandlers>
<catch faultName="taskmngr:taskErroredFault" faultVariable="oraBPMTaskErroredFaultMessage">
<assign name="readErroredTask">
<copy>
<from variable="oraBPMTaskErroredFaultMessage" part="payload"/>
<to variable="oraBPMTaskMessage" part="payload"/>
</copy>
</assign>
</catch>
</faultHandlers>
<sequence>
<invoke name="initiateTask" partnerLink="TaskManagerService" portType="taskmngr:TaskManager" operation="initiateTask" inputVariable="oraBPMTaskMessage" outputVariable="oraBPMTaskMessage"/>
</sequence>
</scope>
<sequence>
<invoke name="initiateTaskActionHandler" partnerLink="TaskActionHandler" portType="taskactionhandler:TaskActionHandler" operation="initiate" inputVariable="oraBPMTaskMessage">
<correlations>
<correlation set="oraBPMTaskIdCor" initiate="yes" pattern="out"/>
</correlations>
</invoke>
<receive name="receiveUpdatedTask" partnerLink="TaskActionHandler" portType="taskactionhandler:TaskActionHandlerCallback" operation="onTaskCompleted" variable="oraBPMTaskMessage" createInstance="no">
<correlations>
<correlation set="oraBPMTaskIdCor" initiate="no"/>
</correlations>
</receive>
</sequence>
<assign name="readUpdatedTask">
<copy>
<from variable="oraBPMTaskMessage" part="payload"/>
<to variable="completeSectionVar"/>
</copy>
</assign>
</sequence>
</scope>
<switch name="taskSwitch" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:tt="http://xmlns.oracle.com/pcbpel/taskservice/tasktype" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<case condition="bpws:getVariableData('completeSectionVar', '/task:task/task:state') = 'COMPLETED' and bpws:getVariableData('completeSectionVar', '/task:task/task:conclusion') = 'ACCEPT'">
<bpelx:annotation>
<bpelx:pattern>Task outcome is ACCEPT
</bpelx:pattern>
</bpelx:annotation>
<sequence>
<assign name="copyPayloadFromTask">
<copy>
<from variable="completeSectionVar" query="/task:task/task:payload"/>
<to variable="getUncompletedSections_getUncompletedSections_OutputVariable" part="getUncompletedSectionsResponse" query="/ns1:getUncompletedSectionsResponse/section"/>
</copy>
</assign>
</sequence>
</case>
<case condition="bpws:getVariableData('completeSectionVar', '/task:task/task:state') = 'COMPLETED' and bpws:getVariableData('completeSectionVar', '/task:task/task:conclusion') = 'REJECT'">
<bpelx:annotation>
<bpelx:pattern>Task outcome is REJECT
</bpelx:pattern>
</bpelx:annotation>
<sequence>
<assign name="copyPayloadFromTask">
<copy>
<from variable="completeSectionVar" query="/task:task/task:payload"/>
<to variable="getUncompletedSections_getUncompletedSections_OutputVariable" part="getUncompletedSectionsResponse" query="/ns1:getUncompletedSectionsResponse/section"/>
</copy>
</assign>
</sequence>
</case>
<otherwise>
<sequence>
<assign name="copyPayloadFromTask">
<copy>
<from variable="completeSectionVar" query="/task:task/task:payload"/>
<to variable="getUncompletedSections_getUncompletedSections_OutputVariable" part="getUncompletedSectionsResponse" query="/ns1:getUncompletedSectionsResponse/section"/>
</copy>
</assign>
</sequence>
</otherwise>
</switch>
</sequence>
</bpelx:flowN>

The replay answer
Advertisement
For each person that reads this:
Please could you reply with at least one of the the following:
1. You didn't understand what I said at all
2. You don't understand what the problem is
3. You understand the problem but don't have any suggestion for a solution
4. You understand the problem but your solution for it has been covered already
5. You understand the problem and have a possible solution
6. You have seen this problem before and solved it
7. You have seen this problem before and are trying to solve it
8. You can see that I have made a ridiculous error
9. You can't be bothered to read the entire post because I have gone into too much detail initially.
I'm not being sarcastic, this would really help me understand why I've had so many views of the post with no responses.
Thanks in advance,
Dan

Go to See the other 5 answers

FlowN Problem - tasks are reset before initiaiton

Category:DefaultRelease time:-0001-11-30Views:130

I'm using flowN to create a number of parallel tasks for a user to work with each element of an array. I'm using the concat() method to generate the correct name and array element for each task. I had to alter the payload information in the user task[More]

Having horrible service with 4GLTE I have had 3G for several weeks (I am not the only person I know having this problem), I have reset my network settings and it did not resolve the issue.  I am also unable to send SMS and text messages without them eithe

Category:DefaultRelease time:2015-10-11Views:130

Having horrible service with 4GLTE I have had 3G for several weeks (I am not the only person I know having this problem), I have reset my network settings and it did not resolve the issue.  I am also unable to send SMS and text messages without them[More]

MSI neo2 platinum problem, forced to reset BIOS everytime I turn on the PSU

Category:DefaultRelease time:2015-10-11Views:130

I just got my neo2 platinum mobo. Everytime I switch it ON all the led's at the back (diagnostic) turn red/orange and never turn green. I have to reset the bios everytime to get it to post successfully. (bios is the original bios, no flashes done) Pr[More]

I can't access to my ipad In MacBook Air. Error shows this device no loger connected or error shows that no response from divice and iTunes can't connected or not found divice, what's the problem? I reset my ipad but no response

Category:DefaultRelease time:-0001-11-30Views:130

I can't access to my ipad In MacBook Air. Error shows this device no loger connected or error shows that no response from divice and iTunes can't connected or not found divice, what's the problem? I reset my ipad but no responseHi .. Which OS X is in[More]

My screen freezes after a few seconds on my iphone 5c and the display fades slightly so you can see faint lines in the background. I'm not sure whether this is easily fixable or a major problem. Have reset the device, but this has worked. Any ideas?

Category:DefaultRelease time:-0001-11-30Views:130

My screen freezes after a few seconds on my iphone 5c and the display fades slightly so you can see faint lines in the background. I'm not sure whether this is easily fixable or a major problem. Have reset the device, but this has worked. Any ideas?T[More]

Iphone 5 stopped charging and playing music through usb in my 2012 Chevy sonic after iOS 8.1 update. Several friends have same problem. Hard reset didn't help. Help???

Category:DefaultRelease time:-0001-11-30Views:130

Iphone 5 stopped charging and playing music through usb in my 2012 Chevy sonic after iOS 8.1 update. Several friends have same problem. Hard reset didn't help. Help???Fixed it. It is on Chevrolet's end. Press config to access the configuration settin[More]

I just bought the a iPod 5th generation and I can't delete my email it keeps down loading back on my inbox over and over it's very annoying what can I do to fix the problem I've reset my mail and it still keeps down loading over and over what can I do?

Category:DefaultRelease time:-0001-11-30Views:130

I just bought the 5th generation iPod my email keeps downloading over and over when I go to delete my email what can I do I've even reset my email and it still keeps doing the same thing it's annoying what else can I do to fix the problem?Try: - Rese[More]

HT5642 Upgraded this morning. All worked fine for about 30min then "no service". Still the same problem and a reset of the device only fixes the problem for 15min. then we are back to no service?? When will apple fix this???

Category:DefaultRelease time:-0001-11-30Views:130

Upgraded this morning. All worked fine for about 30min then "no service". Still the same problem and a reset of the device only fixes the problem for 15min. then we are back to no service?? When will apple fix this???Tried to reset network setti[More]

When i listened my music on my ipod nano 4th, It's sound like a used LPwith the distortion. I check my earphone and it's not the problem. I reset my ipod and it's still having the same problem. Does anybobody having a solution ?

Category:DefaultRelease time:-0001-11-30Views:130

When i listened my music on my ipod nano 4th, It's sound like a used LP with the distortion. I check my earphone and it's not the problem. I reset my ipod and it's still having the same problem. Does anybobody having a solution ?From my limited knowl[More]

Problems using the reset password function on mac osx server.

Category:DefaultRelease time:-0001-11-30Views:130

Hey , Having problems with the reset password functions on the OSX server. When I try to do through the command line it asks for the old password of the user. So how do I fix the problem? Do I have to log in onto the ldap server as the admin and rese[More]

ACR 6.1 problem: presets are resetting settings

Category:DefaultRelease time:-0001-11-30Views:130

Hi all, First post in these forums.  I've been using ACR for years and have been using Photoshop CS5 for a few weeks with no problems.  I've now installed ACR 6.1... Here's the problem that is driving me nuts: when I apply a preset to an image, ALL s[More]

Hot
Hi, I own a *Satellite Pro L20-212*, *Windows XP (SP2) is installed, but USB2.0 does not work*. I can't see anything about USB2.0 in the Devicemanager and the speed of the attached USB2.0 devices is at the USB1.1 level. I don't know which information [More]
I've switched to a 5s from a 4s I'm having a hard time reciveing my old and new emails and had to manually download all apps ,my contacts went through just fine I'm not reciveing any email? Can anybody help?Do you have the email accounts created on t [More]
(I apologize for the strange formatting of this message. I don't know exactly how to control it.) I'm trying to deploy a basic "Hello World" servlet into Tomcat (6.0.18) on Mac OS X Server (10.5.6). When I try to access it. I get 404 (not found) [More]
Hi, My scenario is file to r/3 wherein the source file is a fixed length file.  So I am using file content conversion in my sender adapter. My source structure looks like:- DT_TRAN |__RECORD  1..unbounded |_____HEADER    1 |_____QUOTE      0...unboun [More]
Dear Friends, I am trying to implement eRecruiting in our IDES system which will be used a reference for an upcoming implementation project. Implementation Scope : ECC 6.0. The implementation is an integrated one i.e., eRecruiting is also in the same [More]
Pardon this slightly off-topic query, but I don't believe there is a more proper place for it. Been a while since I've upgraded anything, but I finally installed Solaris 10 on my Ultra 30 (a clean install, replacing Solaris 9). The installation went [More]
If I have a WSDL for an SAP web service, how can I determine what BAPI is being exectued on the back end? For example, given the Web Service name EmployeeBasicDataByEmployeeQueryResponse_In, how can I tell what BAPI(s) are used? Please be specific in [More]
To get Actual/plan costs for the value categories in Plant Maintenance workorders, which DataSource  would I use? The 0PM_OM_OPA_2 or 0CO_OM_OPA_6? What is the difference? The 0CO_OM_OPA_6 is already pulling data for Internal orders in our system. Ho [More]
Hi Can anyone tell me how to get rid of the default context in Tomcat 5.5 (Linux)? I want to make my own webapp the default context (which is easy in all previous releases) but no matter what I try, it doesn't work. I've tried editing: 1) conf/server [More]
Hi - I've got a headset that I plug in. I can hear from the headset speakers, but the headset microphone does not appear in the dropdown list of available microphones (there's only one that appears - a Realtek.Hi - So I understand you to mean that if [More]