SetPropertyOnComponents

Node Action:

The SetPropertyOnComponents node action sets a property on a collection of components. Each component can have a custom value.

Parameters:

se_type

SetPropertyOnComponents

se_type = SetPropertyOnComponents

se_propertyName

The name of the property to add or update.

se_determinePropertyName

A lambda to create a property name.

se_determineValuesByComponent

A lambda to build a dictionary of component IDs to set. The dictionary should be <string,object>.

se_resultVariable

Future functionality to set a result variable with the updated components.

Example:

Set Property On Components: Sets a NewTestProperty on the selected components.

digraph workflow {

entry[
  
  
  
  se_type0 = MultiComponentToolTrigger,
  se_displayName0 = "Update attribute for components"
  se_iconService0 = ""
  se_iconUrl0 = ""
  se_requiresConnection0 = false,
  se_sortOrder0 = 0,
  se_visibilityCondition0 = "(dynamicStateMachineContext, msLogger) => {
    return true;
  }",

]

UpdateComponents[

  se_type0 = SetPropertyOnComponents,
  se_determineValuesByComponent0 = "(dynamicStateMachineContext, msLogger) => {
    var componentInfos = dynamicStateMachineContext.Event[\"componentInfos\"];
    var ids = new List<string>();
    foreach(var componentInfo in componentInfos)
    {
      ids.Add(componentInfo.component.id.ToString());
    }
    
    var workRequest = dynamicStateMachineContext.Event[\"workRequest\"].name.ToString();
    
    return ids.ToDictionary(i => i, _ => workRequest);
  }",
  se_propertyName0 = "NewTestProperty"
  se_resultVariable0 = ""


]
entry->UpdateComponents
UpdateComponents->exit
}
Feedback
QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.