(solved) Initialize Business variable using process variable value
can i initialize a property of a business varible using the value of a process valiable?
The above code in the groovy script throws the exception "No contract data found named: aProcessVar"
def myvar = new myBusinessObj()
myvar.aBusinessVar = apiAccessor.getProcessAPI()
Also on a connector (input or output) i cannot update the value of a variable:
According to your code example your are not only updating the business object attribute but you are actually creating a new instance of this business object by calling the
Can you clarify when and how the process variable is initialized and also when is the business variable initialize and when do you want to update it? (by when I mean in the default value of the variable, in an operation, in connector output...).
Note that sharing your process (exported as a .bos file) can help to identify a solution.
Can you share your process file? I need to understand a little bit what you are trying to achieve in order to provide appropriate help.
While I understand that more info might make diagnosis easier giving us some, any, examples would help get over the hurdles.
I'm getting frustrated failing to do really simple things. I want to put the results of a script into a field in a business variable - but the GUI will only let me have a "whole" business object. I just can't see how to get it to set a single field.
To update a business variable attribute using the output of a script, in the operation definition, click on the "Takes value of" link and in the drop down list select "Use a Java method" and select the appropriate "set" method to update the attribute you want.
I create an example with a simple BDM that you can download and run: https://www.dropbox.com/s/4iptla2x7rk5ha8/DemoUpdateBusinessVariableAttr...
My example was build with Bonita Studio 7.6.2, so updating your installation might allow you to import the example.