Book a Demo

Author Topic: Issue with Setting Property Type on a CallBehaviorAction  (Read 3320 times)

themiyac

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
    • View Profile
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


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Issue with Setting Property Type on a CallBehaviorAction
« Reply #1 on: December 30, 2016, 04:57:19 am »
Try setting ClassifierID instead of the PropertyType. That should do it.

q.