Call a coded workflow in a library from another coded workflow in another library

Hi.
I created a new library (c#) and added a coded workflow.
In that coded workflow I call system.GetAsset(assetName). A method from “UiPath.CodedWorkflow”.

If I use this coded workflow from a normal workflow within the library it works.
If I use this coded workflow from another coded workflow within the same library with the below code - it works.

var result = RunWorkflow(“CallMeWorkFlow.cs”,new Dictionary<string, object>()
{
{“assetName”, “DS_Claim_Scope”}
});
string outputFromCallMe = result[“Output”].ToString();

If I create another library, adds a dependency to the first library, add a normal workflow and drags an activity into the workflow - it works.

BUT if I add a coded workflow to this other library and wants to call it it fails with “Object reference not set to an instance of an object”

But if I remove the call to system.GetAsset(assetName) in the first library and only use regular .net code and not UiPath components - it works fine.

What am I missing to make it work?

Best regards
Per Th.

@pekt

Looks like in second library the required functionis not itialized

Cheers

Hi

But how to initialize it from c# in a coded workflow?
If I call it as an activity from a normal workflow it works fine.

Br
Per Th.

I opneded a support case and got the answer that it was not supported :confused: