Source: factory.core/extend.edit/ObjWorkflowEdit.py
A class for editing and managing workflows.
| Method | Signature | Description |
|---|---|---|
| get_node_details | get_node_details(workflow_code: str, current_node: str) -> Tuple[str, ...] |
Gets the details of a node in a workflow. |
| get_node_type | get_node_type(workflow_code: str, current_node: str) -> str |
Gets the type of a node in a workflow. |
| get_node_branch_possible | get_node_branch_possible(workflow_code: str, current_node: str) -> str |
Gets the possible branches of a node in a workflow. |
| get_source_nodes | get_source_nodes(workflow_code: str, current_node: str) -> StringList |
Gets the source nodes of a node in a workflow. |
| get_target_nodes | get_target_nodes(workflow_code: str, current_node: str) -> StringList |
Gets the target nodes of a node in a workflow. |
| get_workflow_object | get_workflow_object(workflow_code: str) -> ObjApi.ObjApi |
Gets the workflow object for a given workflow code. |
| get_form_object | get_form_object(form_name: str) -> ObjApi.ObjApi |
Gets the form object for a given form name. |
| generate_form_test | generate_form_test(form_from: str, form_to: str, workflow_code: str) -> None |
Generates a test for a form workflow. |
| generate_form_workflow | generate_form_workflow(form_from: str, form_to: str, workflow_code: str = '') -> str |
Generates a form workflow. |
| get_node_connections | get_node_connections(workflow_code: str, node_from: str, to_node: str) -> Tuple[str, str, int, int] |
Gets the connections of a node in a workflow. |
| create_node | create_node(workflow: str, node_to: str, node_type: str = 'NONE') -> str |
Creates a node in a workflow. |
| add_branch_possible | add_branch_possible(workflow: str, node_to: str, guid: str) -> None |
Adds a possible branch to a node in a workflow. |
| add_node | add_node(workflow: str, node_from: str, to_node: str, name: str = '', guid: str = '', description: str = '') -> None |
Adds a node to a workflow. |
| add_branch | add_branch(workflow: str, node_from: str, node_to: str, branchsql: str, name: str = '', guid: str = '', description: str = '') -> None |
|
| edit_sms | edit_sms(smscode: str, description: str, smsconnection: str, message: str, provider: str) -> None |
Edits an SMS definition. |
| edit_calculation | edit_calculation(calculationgroup: str, calculationname: str, rank: int, sql: str, description: str, hasresult: str) -> None |
Edits a calculation. |
| delete_calculation | delete_calculation(calculationgroup: str, calculationname: str) -> None |
Deletes a calculation. |
| add_calculation | add_calculation(calculationgroup: str, calculationname: str, rank: int, sql: str, description: str, hasresult: str) -> None |
Adds a calculation. |
| get_calculationgroup | get_calculationgroup(calculationgroup: str) -> None |
|
| update_calculationgroup | update_calculationgroup(calculationgroup: list, calculationgroup_name: str) -> None |
|
| edit_channel | edit_channel(channel: str, description: str, notes: str, lineheader: str, email: str, background: str, style: str) -> None |
Edits a channel definition. |
| edit_notify | edit_notify(notifycode: str, description: str, rank: str, notifyvaluesql: str, triggersql: str, triggercooldown: str) -> None |
|
| edit_service | edit_service(servicecode: str, service: str, servicetype: str, description: str, servicecachetime: str, remoteconnection: str, remoteconnection2: str, remoteserviceconnection: str, remoteserviceconnection2: str, payloadtype: str) -> None |
|
| edit_alert | edit_alert(alert: str, description: str, triggercooldown: int, triggersql: str, alertvaluesql: str, active: str) -> None |
|
| edit_node | edit_node(workflow: str, node_type: str, name: str, guid: str, description: str, rank: int, active: str) -> None |
Edits a node in a workflow. |
| new_node | new_node(workflow: str, node_type: str, name: str, guid: str, description: str) |
Inserts a new workflow node. |
| edit_gate | edit_gate(workflow: str, guid: str, possiblebranches: str, branchsql: str) -> None |
Edits a gate in a workflow. |
| del_node | del_node(workflow: str, workflow_node_guid: str) -> None |
Deletes a node from a workflow. |
| get_associated_webhooks | get_associated_webhooks(workflow_code: str) -> StringList |
Retrieves a list of webhook codes associated with a given workflow. |
| get_workflow_json | get_workflow_json(workflow_code: str) -> Optional[JsonDict] |
Generates a JSON object that defines a workflow from the database. |
| get_calculation_json | get_calculation_json(calculation_group: str) -> Optional[JsonDict] |
Generates a JSON object that defines a calculation from the database. |
| load_workflow_from_yaml | load_workflow_from_yaml(filename: str, new_workflow_code: str = '') -> None |
Loads a workflow from a YAML file and saves it to the database. |
| remove_none_values | remove_none_values(data: Any) -> Any |
Recursively removes items with None values from a dictionary or list. |
| remove_package | remove_package(data: Any) -> Any |
Recursively removes the "Package" key from a dictionary or list of dictionaries. |
| save_workflow_to_file | save_workflow_to_file(workflow: JsonDict, filename: str) -> None |
Saves the workflow JSON object to a file with snake_case keys. |
| safe_sql_insert | safe_sql_insert(sql, data) |
Inserts safely handling quotes |
| closure | closure(webhook_code: str) -> None |
Analyze and compile workflow dependencies and structure. |
Finds all SQL statements in a nested data structure.
Extracts table names from a SQL statement.
Scans a workflow's SQL statements in the database to identify and categorize table names.
Adds a node to a workflow.
Deletes a node from a workflow.
Generates a form workflow.
Generates a YAML file for the specified workflow.
Saves a calculation group to a YAML file via ObjCalculationEdit.
Analyze and compile workflow dependencies and structure.
Loads a workflow from a YAML file and saves it to the database.
Export a scorecard definition to YAML.
Load a scorecard definition from a YAML file into the database.
Export a workflow to BPMN 2.0 XML for Camunda 8.
Renumbers workflow node Rank values to match execution order.
Reranks nodes then renders a detailed Rich flow diagram.