GetActiveJobResources
Node Action:
The GetActiveJobResources node action gets the Assignment, Design and Work Request resources for the currently open design.
Parameters:
se_type
GetActiveJobResources
se_type = GetActiveJobResourcesse_uri
The URI to which the request is sent.
se_resultVariable
The variable name to store the resource parameters.
Example:
Show Design Custom Properties: The following workflow allows you to get the design custom properties for the currently open design.
digraph workflow {
entry[
se_type0 = DesignToolTrigger,
se_deferUntilOnline0 = false,
se_displayName0 = "Show Design Custom Properties"
se_iconService0 = ""
se_iconUrl0 = ""
se_requiresConnection0 = false,
se_visibilityCondition0 = "(dynamicStateMachineContext, msLogger) => {
return true;
}",
]
fetchResources[
se_type0 = GetActiveJobResources,
se_resultVariable0 = "Resources"
]
showCustomProperties[
se_type0 = PromptUser,
se_cardTemplate0 = "{
\"type\": \"AdaptiveCard\",
\"$schema\": \"https://adaptivecards.io/schemas/adaptive-card.json\",
\"version\": \"1.5\",
\"body\": [
{
\"type\": \"FactSet\",
\"$data\": \"${CustomProperties}\",
\"facts\": [
{
\"title\": \"${key}\",
\"value\": \"${value}\"
}
]
}
]
}"
se_determineCardData0 = "(ctx, msLogger) => {
Debugger.Break();
var properties = ctx.State.Resources.design.customProperties;
var dictionary = new Dictionary<string, object>();
foreach(var p in properties)
{
dictionary.Add(p.Name, p.Value);
}
dynamic obj = new ExpandoObject();
obj.CustomProperties = dictionary.ToArray();
return obj;
}",
se_promptCaption0 = "CustomProperties"
]
entry->fetchResources->showCustomProperties->exit
}