In the model, different tokens have different "bayLocation" labels. I am trying to make an if statement to set object states based on the label. For example, if bayLocation == "C_G Bay 1" then the state of C_G Bay 1 basic FR will change to STATE_PROCESSING.I attempted here but I am getting the error: Invalid type for right side of assignment operation.
treenode current = param(1); treenode activity = param(2); treenode token = param(3); treenode processFlow = ownerobject(activity); treenode bayLocation = getlabel(token, "bayLocation"); if (bayLocation == "C_G Bay 1") { //************* PickOption Start *************\\ /***popup:SetObjectState*/ /**Set Object State*/ #define Default 0 treenode object = /** \nObject: *//***tag:object*//**/node("C_G Bay 1", model())/**/; int state = /** \nState: *//***tag:state*//**/STATE_PROCESSING/**/; int profile = /** \nProfile: *//***tag:profile*//**/Default/**/; setstate(object, state, profile); }//******* PickOption End *******\\ if (bayLocation == "C_G Bay 2") { //************* PickOption Start *************\\ /***popup:SetObjectState*/ /**Set Object State*/ #define Default 0 treenode object = /** \nObject: *//***tag:object*//**/node("C_G Bay 2", model())/**/; int state = /** \nState: *//***tag:state*//**/STATE_PROCESSING/**/; int profile = /** \nProfile: *//***tag:profile*//**/Default/**/; setstate(object, state, profile); } //******* PickOption End *******\\