runWorkflows function

void runWorkflows({
  1. required CNode node,
  2. required Trigger trigger,
  3. required BuildContext context,
  4. required int loop,
  5. dynamic inputValue,
})

Implementation

void runWorkflows({
  required CNode node,
  required Trigger trigger,
  required BuildContext context,
  required int loop,
  dynamic inputValue,
}) {
  final overrideState = context.read<OverridesCubit>().state;
  final executer = WorkflowExecuter(
    nodeID: node.id,
    nodeName: node.name!,
    workflows: overrideState.workflows.values.toList(),
  );
  context.pageCubit.runWorkflow(() {
    if (executer.doesWorkflowExist(trigger)) {
      return _runOverride(executer, trigger, inputValue);
    }
    return getIt<RunMethodsStation>().runWorkflows(
      context,
      node.getAttributes[DBKeys.workflows],
      loop,
      target: trigger,
      inputValue: inputValue,
    );
  });
}