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
Guys,This has been frustrating me so bad lately I'm thinking about taking back My IP4 and getting the Samsung Captivate.When I go inside my house my 3g connection becomes terrible,One page might open every 5 minutes.It's very bad and I don't live in [More]
Hi! When I'm creating a new maintenance transaction in the field product version I have no choice it shows "Not available": I´ve already defined the Solution manager. I´ve followed the spro conf. steps. My Solution manager is 7.0 patched at: SAP [More]
Please help me. I have scanned an image of a text in a book.  The scanned image is automatically uploaded into a JPEG file.  How do I convert this into a PDF file?None of the free Adobe Reader products provide the capability of converting image files [More]
Hi, I need help regarding pre-req how i install VAC 7 C and C++ verison 7 on AIX IBM P6. (vac.70.aix52-61.jun2009.ptf.tar.Z) When I install VAC 7 using "smitty install_all" there are some files set missing and installation failed. Please help me [More]
Hello I have 3 cursor which query on different tables and return the same columns. I need to accumulate the result set of 3 cursors into a single ref cursor. Is this possible. If so how. regards, Ravi NaralaIt's possible, but it's not recommended. Do [More]
Hi everyone, has anybody figured out a way to sort recent items by date order rather than alphabetically. I'm totally frustrated at being unable to do this. i look forward to your repliesHello I already passed this script. Using it, you will be able [More]
Dear All, I have maintained the number ranges for certificate printing. When i run the j1incert the certificate number is not printing on the certificate. Please advise.me on how to solve this error. Regards KeshavMay be you have seen preview, if you [More]
I understand that the long-term plan for data loading is to provide a single tool, which is referred to as HCM Data Loader. HCM Data Loader is intended to provide the standard data-import solution and a single entry point for managing bulk data loadi [More]
I try to initialize a BusinessPartners Object in C#. A ComException will be thrown. The message is: "An error occurred while trying to load user fields" ErrorCode is -1122. My Code: SAPbobsCOM.BusinessPartners businessPartner = null; businessPar [More]
hi, i always get this error every hour. how do i stop this? Thanks!Hi, I am having the same issue. When I click to view the  details, 'Selected message does not exist (any more)' error appears. Any ideas? thank you.Read other 11 answers [More]