1
Automation Interface, Add-Ins and Tools / Issue with Setting Property Type on a CallBehaviorAction
« on: December 30, 2016, 04:04:22 am »
I am performing the following in order to create a call behavior action typed by an activity type. The call behavior action is being created inside the activity element, but the activity type is not being set by the SetPropertyType method. As far as I am aware it should be set using this method.
/**
/ Creates a call behavior action inside of an activity
/ @param activity the parent element
/ @param name desired name of created call behavior action
/ @param activityType the type of the call behavior action
*/
Element createCallBehaviorAction(Element activity, String name, Element activityType) {
Element action = activity.GetElements().AddNew(name, "CallBehaviorAction");
action.SetPropertyType(activityType.GetElementID());
action.Update();
return action;
}
Example call: createCallBehaviorAction(testActivity, "action", helloWorld)
After the call -->
I can see the following inside the model
testActivity
-action
However I expect the type to be set like...
testActivity
-action : helloWorld
/**
/ Creates a call behavior action inside of an activity
/ @param activity the parent element
/ @param name desired name of created call behavior action
/ @param activityType the type of the call behavior action
*/
Element createCallBehaviorAction(Element activity, String name, Element activityType) {
Element action = activity.GetElements().AddNew(name, "CallBehaviorAction");
action.SetPropertyType(activityType.GetElementID());
action.Update();
return action;
}
Example call: createCallBehaviorAction(testActivity, "action", helloWorld)
After the call -->
I can see the following inside the model
testActivity
-action
However I expect the type to be set like...
testActivity
-action : helloWorld