The code to be included in the package and uploaded to DesignAutomation:
<code>private void HandleDesignAutomationReadyEvent(object sender, DesignAutomationReadyEventArgs e)
{
if (...) // The flag I'm getting from the API side.
{
Method1();
}
else
{
Method2();
}
}
</code>
<code>private void HandleDesignAutomationReadyEvent(object sender, DesignAutomationReadyEventArgs e)
{
if (...) // The flag I'm getting from the API side.
{
Method1();
}
else
{
Method2();
}
}
</code>
private void HandleDesignAutomationReadyEvent(object sender, DesignAutomationReadyEventArgs e)
{
if (...) // The flag I'm getting from the API side.
{
Method1();
}
else
{
Method2();
}
}
The code which I have on the API side:
<code>public async Task RunDesignAutomation()
{
var workItem = new WorkItem()
{
ActivityId = activityName,
Arguments = new Dictionary<string, IArgument>()
{
{ "rvtFile", inputFileArgument },
{ "inputJson", inputJsonArgument },
{ "result", outputFileArgument },
{ "onComplete", onCompleteArgument }
}
};
_designAutomation.CreateWorkItemAsync(workItem);
}
</code>
<code>public async Task RunDesignAutomation()
{
var workItem = new WorkItem()
{
ActivityId = activityName,
Arguments = new Dictionary<string, IArgument>()
{
{ "rvtFile", inputFileArgument },
{ "inputJson", inputJsonArgument },
{ "result", outputFileArgument },
{ "onComplete", onCompleteArgument }
}
};
_designAutomation.CreateWorkItemAsync(workItem);
}
</code>
public async Task RunDesignAutomation()
{
var workItem = new WorkItem()
{
ActivityId = activityName,
Arguments = new Dictionary<string, IArgument>()
{
{ "rvtFile", inputFileArgument },
{ "inputJson", inputJsonArgument },
{ "result", outputFileArgument },
{ "onComplete", onCompleteArgument }
}
};
_designAutomation.CreateWorkItemAsync(workItem);
}
How can I set my own flag for a WorkItem that will help determine on the bundle side which method to use? (Method1 or Method2)
Note: Method1 and Method2 accept a different ‘inputJson’
New contributor
Oleh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.