I'm trying to retrieve the DOM Instance from inside of an activity for Process Automation. I see that you can connect it to a profile, and use the PaProfileLoadDomHelper class to both GetParameterValue and UpdateField, or even TransitionState.
Is there a way to retrieve the DOM instance guid from the token to do further manipulation?
Thanks in advance for any information.
As Emmanuel's comment said, we added a Field with the DOM instance and filled that in to pass to the token.
See it copied here:
Hi Blake, if you want to retrieve the instance yourself and not rely on the PAHelper to retrieve/update values, then I’d suggest to add a FieldDescriptor to store the reference of the DOM Instance.
Then you can use the Helper to get the value of that FieldDescriptor.
Following code will give you the instance with a specific Guid object.
var domHelper = new DomHelper(engine.SendSLNetMessages, "my_module");
var domInstanceFilter = DomInstanceExposers.Id.Equal(myGuid);
var instance = domHelper.DomInstances.Read(domInstanceFilter).First();
Once you have the instance you can use the information in following help to update the values of a DomInstance.
Hi Blake, if you want to retrieve the instance yourself and not rely on the PAHelper to retrieve/update values, then I’d suggest to add a FieldDescriptor to store the reference of the DOM Instance.
Then you can use the Helper to get the value of that FieldDescriptor
Hi Jeroen, indeed getting the instance itself is straightforward if I have a guid. With Process Automation, you pass an instance to the token. However I need a way to get that instance id inside the activity, so the “myGuid” is what I’m missing.