- Introduction
- Démarrage
- Build on any canvas
- Build with Case
- Référence (Reference)
- Définition des clés de cas (système vs. externe)
- Établissement des contrats d'E/S et de réécriture de la tâche
- Modélisation des étapes primaires et secondaires
- Déclencher un cas à partir de Data Fabric
- Implémentation des personas et des autorisations au niveau de l'étape
- Définition des SLA et des règles d'escalade automatisées
- Configuration d'une boucle de retraitement (renouvellement)
- Configurer et tester l'agent Case Manager (aperçu)
- Build with Flow
- Build with BPMN
- Opérations
- Surveillance
- Optimisation
- Informations de référence
Transformer
Appliquez plusieurs opérations à une liste dans un seul nœud: la filtrer, reformuler chaque élément, regrouper les éléments ou exécuter votre propre JavaScript.
Transform applies a chain of operations to a list in one node. Each operation receives the result of the one before it, so you can, for example, keep only the open orders, reshape each one, then group them by customer. It's in the Data category of the Add node panel.
Configurer le nœud
-
Sélectionnez + sur le handle du nœud qu’il suit, puis sélectionnez Données > Transformer.
-
In the properties panel, select Edit transformation.
-
In Collection, enter the list to transform, for example
$vars.scriptTask1.output. The field expects an array. -
Ajoutez les opérations, dans l'ordre dans lequel elles doivent s'exécuter:
Opération (Operation) Ce qu’il fait Ajouter un filtre Returns only the items that match the conditions you set. Add Map Turns each item into a new shape, with the field mappings you define. Ajouter un groupe par Groups the items by a field, and computes a count, sum, or average for each group. Add Custom Script Runs your own transformation logic in JavaScript. -
Select Run to test the node, and check the result in the Output column.
Sortie
The node returns the result of the last operation as output. Later nodes read it as $vars.<nodeId>.output, for example $vars.transform1.output.
Transform or Script
Utilisez la fonction Transformer lorsque le travail filtre, reforme ou regroupe une liste. Utilisez Script lorsque la logique ne correspond pas à ces opérations. Dans la transformation, l'activité Ajouter un script personnalisé couvre une seule étape qui a besoin de code.
Problèmes couramment rencontrés
| Problème | Résolution |
|---|---|
| Collection shows an error | The field is required, and it expects an array. Check the value in the execution trace of the node that produces it. |
| La sortie est vide après un filtre | The conditions don't match any items. Check the field names and values of the input in the execution trace. |
La sortie contient des champs undefined après une carte | The source field doesn't exist in the input items. Check the input structure in the execution trace. |
Prochaines étapes
- Filter, Map, and Group by: one operation per node.
- Variables and data flow: how
$varsreferences work.