Answered

How to get value of parameter entity in business expressions?

I am getting a error while retrieving value from a parameter entity.Below is my code.

var crewListArray=CHelper.GetValueAsCollection(<PortCallApplication.CrewList>);

for (var I=0; I < crewListArray.size(); I++){

NewActivity=Me.newCollectionItem("PortCallApplication.MergedApplicants");

var TempVariable= crewListArray.get(I);

var ApplicantInfo=TempVariable.getXPath("ApplicantInfo");

CHelper.trace("MyTrace","2 : "+TempVariable.getXPath("StatusUponArrival.Id").Value);

var StatusUponArrival=TempVariable.getXPath("StatusUponArrival.Id");

var JobTitleRating=TempVariable.getXPath("JobTitleRating");

}

CHelper.trace("MyTrace","2 : "+TempVariable.getXPath("StatusUponArrival.Id").Value);

above line gives me below value in trace.

BizAgi.EntityManager.Entities.StatusUponArrival

var StatusUponArrival=TempVariable.getXPath("StatusUponArrival.Id"); error is coming on this line i have attached snapshot of the error.

Comments (1)

photo
1

Dear Rahul,

To access Parameter and System entities that are related to the data model, please follow this function:

  1. CHelper.getEntityAttrib("Entity","ValueToReturn","filter","")



For further information: http://help.bizagi.com/bpm-suite/en/index.html?obtain_and_use_entity_values.htm


It is a common requirement to access Parameter and System entities that are not related to the data model, in order to extract information for use in XPath expressions.

In such cases, where the entities cannot be accessed directly through XPath navigation, the EntityManager functions are employed. The information returned by EntityManager is handled as a collection of items. You will then need to iterate over the collection to access specific information (i.e. the item values).
The following is the syntax of the EntityManager function:



  1. CEntityManager.GetEntity("Entity").GetEntityList("Attribute","Filter","Search","Order");






For further information: http://help.bizagi.com/bpm-suite/en/index.html?access_entities_not_related_to.htm


Best Regards