Hi Anastasia. Your code illustrates how to call a BP by passing parameters. How would one go about reading BP parameters after the execution of the business process??
within a business process I have a contact object and an account object. I want to associate them and be able to specify whether the contact is the "primary" contact or not.
Do I create a "Connecting contact to account" record? if so, how?
You can read data from Account, then read data from Contact with the following filter - http://prntscr.com/lockqu (or http://prntscr.com/lockvf if you need to find contact which is connected with certain account)
As far as I understood your business goal, you are trying to fetch some parameters via [Read Data] element in your script task and pass it further to the Delete query.
Firstly, you need to get parameters in the [Script Task] from the [Read Data] element.
For the interpreted process the algorithm is the next:
[#Read opportunity product.First item of resulting collection.Opportunity#] and [#Read opportunity product.First item of resulting collection.Product#]
2) Use business-parameters in your Script-task.
var opportunityId = Get<Guid>("ProcessParam1");
var productId = Get<Guid>("ProcessParam2");
Then you need to get the userConnection in order to pass it in the Delete query:
var userConnection = Get<UserConnection>("UserConnection");
I tried to consume it using as per documentation but have no luck so far.
(1) tried the webservice using Postmand (works)
(2) try using BMOnline with same parameters
2 headers parameters
Key : Authorization
Authorization : Content-Type
1 body parameters
Json path : $
Data Type : text
is Array : No
Value : <copy from Postman raw body>
but it keep replying response 400
{"error":{"code":"BadArgument","message":"Invalid argument provided.","details":[{"code":"InputMismatchError","target":"input1","message":"Input data does not match input port schema."}]}}
You should deploy an application on-site, create a web service call and test network via fiddler to see what request is sent to web service. The message you've got means that bpm'online sends a request in a format that differs from that you are expecting. Then you can set up parameters in a such way that will fit to Azure learning standard.
The other option will be creating a script task with calling that webservice from c# code. If you are a developer this is the best way because allows you to do more than built-in web service call.