How Can We Help?
Issue
A call a method has been attempted in an external DLL (GetValue in WfiClient) in the dynamic description of an activityA specific step in a process. It will be the user interface for that step (web form or a screen), for example, the Leave Application (screen interface or web form) will be the first Activity in the Leave Requisition process. The Leave Application Authorization will be the second step or Activity in the Leave Requisition process. One Process can have multiple activities. in XMPro 5.1.3.
The code and everything seems to be in order.
The problem is that an activity with no description is displayed.
The XMUsings and XMReferences do not seem to work here.
Does anyone know what is needed to do to use it as intended?
Resolution
Currently, the Managed Code execution for Dynamic Description does not allow using of External DLL via the XMReference and XMUsing functionality as the 2nd Activity has not been created at the moment.
The way to achieve this for either the FirstActvity or Subsequent Activity is as follows:
Create your ThirdParty DLL and copy it to the bin folder of the XMWorkspace.
In the FirstActivity add a reference label to the form and set its visibility to false. In its OnRefresh method call the external DLL’s method to set its value for the dynamic description.
In the Dynamic Description method of the First Activity or the Subsequent Activity return the value of the above hidden reference label as the dynamic description.
Additional Information
Q) Values can be received from previous activity objects as long as the are in the same branch of the tree?
A) That is true.
Q) Can it get values from objects on the same activity as the description is for?
A) This is true only for the First Activity and not for Subsequent activities
Q) When does the description get created? Before the onload of the activity or after? Before the onload of any objects of after?
A) For the First Activity, the Dynamic Description is created after the OnLoad and OnRefresh events of the Activity.
For the subsequent activities, the dynamic description is created even before the Activity is actually created so the Activity’s OnLoad event does not fire at all. This is an independent code that is executed just to get the description
for the activity.
Q) Do First Activities behave differently to other activities?
A) Yes.
Thanks for the feedback!
This is bad news because it puts me in a very difficult situation.
There is a process that splits and during the split, one branch could change the name of the customer (the primary descriptor for activities).
The other branch cannot ‘see’ this customer name change because one branch cannot access other branches in the process, even in code.
It can also not query the database to read it from there.
Could we look at resolving one or possibly both these issues in future versions (see other community threads if you need more detail)?
The thought of the solution may work, but there needs to an understanding about how and when the dynamic description gets created.
The following questions relate to the dynamic description of an activity:
Are the values from previous activity objects as long as the are in the same branch of the tree?
Can it get values from objects on the same activity as the description is for?
When does the description get created? Before the onload of the activity or after? Before the onload of any objects of after?
Do First Activities behave differently to other activities?
Thanks for your feedback. We have created a Task to have a look at how to allow use of external DLL from within Dynamic Description. The task number for this issue is 639.
With regards to your remaining questions:
Q) Can I get values from previous activity objects as long as the are in the same branch of the tree?
A) That is true.
Q) Can it get values from objects on the same activity as the description is for?
A) This is true only for the First Activity and not for Subsequent activities
Q) When does the description get created? Before the onload of the activity or after? Before the onload of any objects of after?
A) For the First Activity, the Dynamic Description is created after the OnLoad and OnRefresh events of the Activity.
For the subsequent activities, the dynamic description is created even before the Activity is actually created so the Activity’s OnLoad event does not fire at all. This is an independent code that is executed just to get the description
for the activity.
Q) Do First Activities behave differently to other activities?
A) Yes.
Hope this gives you more understanding of the process of Dynamic Description.