Digital Developer Conference: a FREE half-day online conference focused on AI & Cloud – North America: Nov 2 – India: Nov 9 – Europe: Nov 14 – Asia Nov 23 Register now

Close outline
  • United States
IBM?
  • Site map
IBM?
  • Marketplace

  • Close
    Search
  • Sign in
    • Sign in
    • Register
  • IBM Navigation
IBM Developer Answers
  • Spaces
    • Blockchain
    • IBM Cloud platform
    • Internet of Things
    • Predictive Analytics
    • Watson
    • See all spaces
  • Tags
  • Users
  • Badges
  • FAQ
  • Help
Close

Name

Community

  • Learn
  • Develop
  • Connect

Discover IBM

  • ConnectMarketplace
  • Products
  • Services
  • Industries
  • Careers
  • Partners
  • Support
10.190.13.195

Refine your search by using the following advanced search options.

Criteria Usage
Questions with keyword1 or keyword2 keyword1 keyword2
Questions with a mandatory word, e.g. keyword2 keyword1 +keyword2
Questions excluding a word, e.g. keyword2 keyword1 -keyword2
Questions with keyword(s) and a specific tag keyword1 [tag1]
Questions with keyword(s) and either of two or more specific tags keyword1 [tag1] [tag2]
To search for all posts by a user or all posts with a specific tag, start typing and choose from the suggestion list. Do not use a plus or minus sign with a tag, e.g., +[tag1].
  • Ask a question

how can I move my process instance to another task in my BPD?

550002C86Y gravatar image
Question by DoctorGarcia  (1) | Feb 12 at 09:32 PM bpm 8.5.5rest-apibpdprocess instance

I need to move my Process Instance in a determined task to another task in my BPD, I tried to use the rest api complete to finish my Task and it works then I use the start activity rest api to start in my new task it works too but my bussines data is lost and my instance has an error.... does anyone have an idea?

People who like this

  0
Comment
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

2 answers

  • Sort: 
2700040K2Q gravatar image

Answer by AndrewPaier (2580) | Feb 13 at 10:13 AM

When you complete the task you have to provide the parameters that set the output values for the completed task. (see reference) If you aren't doing this it is likely the system is assuming the values were null and removing the current values. If the task already has the correct values, then you will need to use the 'Get Data' call to read those values and use them to assert the output values you want.

Since you didn't include any code I'm having to assume that you are calling the finish task without providing parameters. If that assumption is in error, then sharing a code snippet might help.

If all you want to do is move the token and not change the data values currently on the BPD then the "Move Token" api might be the better one for you to use.

-Andrew Paier

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
550002C86Y gravatar image

Answer by DoctorGarcia (1) | Feb 13 at 10:39 AM

Hi Andrew I'm not able to implement "Move token" because i'm not the administrator of the WAS and I can't do it. In other way you are rigth I am not sending the parameters because I have approximately 2200 variables and some of them are List then I don't know how I can send the JSON... I try to convert a Hash Map object to JSON and put the JSON as a variable but it throws me an error.

This is how I convert the map to JSON tw.local.listaKey = []; var Info = tw.system.findProcessInstanceByID(tw.local.idInstancia).businessData;

tw.local.listaKey = Info.keyArray(); var valueArray = Info.valueArray();

for(var i=0; i

Comment

People who like this

  0   Show 1   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
2700040K2Q gravatar image AndrewPaier (2580)   Feb 13 at 11:06 AM 0
Share

The "get data" call in the REST API should provide you the data already in the format you are looking for. But now it looks like you are working server-side in the JS-API. Perhaps you should take a step back and explain the underlying use case as there may be a different way to accomplish what you need to do.

As a side note - If your service has 2200 variables that are outputs (we really only need to set outputs) it is likely there is a problem in the underlying approach. Granted it is too late to correct now, but this should be noted as technical debt somewhere. Handing around objects that are not specific to the task one is trying to accomplish adds needless complexity to a solution.

-Andrew Paier

Follow this question

158 people are following this question.

Answers

Answers & comments

Related questions

Terminate activity finishes the job as Error in Web Management Console (WMC) in App Connect Professional 1 Answer

How can I find stuck BPD process instances? 2 Answers

IBM BAW REST API integration with external system 1 Answer

Terminate vs. abort 2 Answers

NULL values in BPD_NAME in TASKS view 2 Answers

  • Contact
  • Privacy
  • IBM Developer Terms of use
  • Accessibility
  • Report Abuse
  • Cookie Preferences

Powered by AnswerHub

Authentication check. Please ignore.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • API Connect
  • Analytic Hybrid Cloud Core
  • Application Performance Management
  • Appsecdev
  • BPM
  • Blockchain
  • Business Transaction Intelligence
  • CAPI
  • CAPI SNAP
  • CICS
  • Cloud Analytics
  • Cloud Automation
  • Cloud Object Storage
  • Cloud marketplace
  • Collaboration
  • Content Services (ECM)
  • Continuous Testing
  • Courses
  • Customer Experience Analytics
  • DB2 LUW
  • Data and AI
  • DataPower
  • Decision Optimization
  • DevOps Build
  • DevOps Services
  • Developers IBM MX
  • Digital Commerce
  • Digital Experience
  • Finance
  • Global Entrepreneur Program
  • Hadoop
  • Hybrid Cloud Core
  • Hyper Protect
  • IBM Cloud platform
  • IBM Design
  • IBM Forms Experience Builder
  • IBM Maximo Developer
  • IBM StoredIQ
  • IBM StoredIQ-Cartridges
  • IIDR
  • ITOA
  • InformationServer
  • Integration Bus
  • Internet of Things
  • Kenexa
  • Linux on Power
  • LinuxONE
  • MDM
  • Mainframe
  • Messaging
  • Node.js
  • ODM
  • Open
  • PartnerWorld Developer Support
  • PowerAI
  • PowerVC
  • Predictive Analytics
  • Product Insights
  • PureData for Analytics
  • Push
  • QRadar App Development
  • Run Book Automation
  • Search Insights
  • Security Core
  • Storage
  • Storage Core
  • Streamsdev
  • Supply Chain Business Network
  • Supply Chain Insights
  • Swift
  • UBX Capture
  • Universal Behavior Exchange
  • UrbanCode
  • WASdev
  • WSRR
  • Watson
  • Watson Campaign Automation
  • Watson Content Hub
  • Watson Marketing Insights
  • dW Answers Help
  • dW Premium
  • developerWorks Sandbox
  • developerWorks Team
  • Watson Health
  • More
  • Tags
  • Questions
  • Users
  • Badges