Documentation ¶
Index ¶
- func CheckRoutingCondition(Routing wftype.RoutingTable, ProcessData map[string]interface{}) bool
- func ExecuteTask(workflowtaskid int64, NodeData wftype.Node, idbTx *sql.Tx, ...) (map[string]interface{}, error)
- func ExecuteTaskTranCode(workflowtaskid int64, TranCodeName string, data map[string]interface{}, ...) (map[string]interface{}, error)
- func ExplodeNextNodes(wg *sync.WaitGroup, WorkflowEntityID int64, nextNodes []wftype.Node, ...) error
- func GetTaskPreTaskData(taskid int64, UserName string) (map[string]interface{}, error)
- func GetTasksbyUser(UserName string) ([]map[string]interface{}, error)
- func GetWorkFlowTasks(workflowentityid int64, UserName string) ([]map[string]interface{}, error)
- func GetWorkFlowbyUUID(uuid string, UserName string, DocDBCon documents.DocDB) (wftype.WorkFlow, primitive.M, error)
- func ValidateAndCompleteWorkFlow(WorkFlowEntityID int64, idbTx *sql.Tx, DocDBCon *documents.DocDB, ...) (bool, error)
- type ExplodionEngine
- type WorkFlowTask
- func (wft *WorkFlowTask) CompleteTask() error
- func (wft *WorkFlowTask) ExecuteTaskTranCode(TranCode string) error
- func (wft *WorkFlowTask) StartTask() error
- func (wft *WorkFlowTask) UpdateProcessData(extprocessdata map[string]interface{}) error
- func (wft *WorkFlowTask) UpdateTaskStatus(newstatus int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRoutingCondition ¶
func CheckRoutingCondition(Routing wftype.RoutingTable, ProcessData map[string]interface{}) bool
CheckRoutingCondition checks the routing condition based on the provided RoutingTable and ProcessData. It returns true if the routing condition is met, otherwise false. The routing condition is met if the ProcessData contains the data specified in the RoutingTable and the value of the data is equal to the value specified in the RoutingTable. If the RoutingTable is the default routing table, it returns true. If the ProcessData does not contain the data specified in the RoutingTable, it returns false.
func ExecuteTask ¶
func ExecuteTask(workflowtaskid int64, NodeData wftype.Node, idbTx *sql.Tx, DocDBCon *documents.DocDB, UserName string) (map[string]interface{}, error)
ExecuteTask executes a workflow task. It takes the following parameters: - workflowtaskid: the ID of the workflow task - NodeData: the data associated with the workflow task node - idbTx: the SQL transaction object - DocDBCon: the document database connection object - UserName: the name of the user executing the task It returns a map[string]interface{} and an error. The map[string]interface{} contains the result of the task execution.
func ExecuteTaskTranCode ¶
func ExecuteTaskTranCode(workflowtaskid int64, TranCodeName string, data map[string]interface{}, idbTx *sql.Tx, DocDBCon *documents.DocDB, UserName string) (map[string]interface{}, error)
ExecuteTaskTranCode executes a transaction code for a workflow task. It takes the workflow task ID, transaction code name, data map, database transaction, document database connection, and user name as input parameters. It returns the result of the transaction code execution and an error, if any. The result of the transaction code execution is a map[string]interface{}.
func ExplodeNextNodes ¶
func ExplodeNextNodes(wg *sync.WaitGroup, WorkflowEntityID int64, nextNodes []wftype.Node, UserName string, ProcessData map[string]interface{}) error
ExplodeNextNodes explodes the next nodes in a workflow task. It creates new workflow tasks for each next node, associating them with the given WorkflowEntityID. The function uses a sync.WaitGroup to wait for all tasks to complete before returning. It also logs performance metrics and any errors that occur during the process.
Parameters: - wg: A pointer to a sync.WaitGroup used to wait for all tasks to complete. - WorkflowEntityID: The ID of the workflow entity. - nextNodes: A slice of wftype.Node representing the next nodes in the workflow. - UserName: The name of the user performing the operation.
Returns: - An error if any error occurs during the process, otherwise nil.
func GetTaskPreTaskData ¶
func GetTasksbyUser ¶
func GetWorkFlowTasks ¶
func GetWorkFlowbyUUID ¶
Types ¶
type ExplodionEngine ¶
type ExplodionEngine struct { WorkflowName string EntityName string Type string Log logger.Log DocDBCon *documents.DocDB DBTx *sql.Tx Ctx context.Context CtxCancel context.CancelFunc UserName string ClientID string // contains filtered or unexported fields }
func NewExplosion ¶
type WorkFlowTask ¶
type WorkFlowTask struct { WorkFlowTaskID int64 DocDBCon *documents.DocDB DBTx *sql.Tx Ctx context.Context CtxCancel context.CancelFunc UserName string ClientID string // contains filtered or unexported fields }
func NewWorkFlowTaskType ¶
func NewWorkFlowTaskType(workflowtaskID int64, UserName string) *WorkFlowTask
NewWorkFlowTaskType creates a new instance of WorkFlowTask with the specified parameters. It initializes the log, context, and other properties of the WorkFlowTask. Parameters: - workflowtaskID: The ID of the workflow task. - UserName: The name of the user. Returns: - A pointer to the newly created WorkFlowTask instance.
func (*WorkFlowTask) CompleteTask ¶
func (wft *WorkFlowTask) CompleteTask() error
func (*WorkFlowTask) ExecuteTaskTranCode ¶
func (wft *WorkFlowTask) ExecuteTaskTranCode(TranCode string) error
func (*WorkFlowTask) StartTask ¶
func (wft *WorkFlowTask) StartTask() error
func (*WorkFlowTask) UpdateProcessData ¶
func (wft *WorkFlowTask) UpdateProcessData(extprocessdata map[string]interface{}) error
func (*WorkFlowTask) UpdateTaskStatus ¶
func (wft *WorkFlowTask) UpdateTaskStatus(newstatus int64) error
UpdateTaskStatus updates the status of a workflow task. It takes a newstatus parameter of type int64, representing the new status value. The function returns an error if there was an issue updating the task status. Otherwise, it returns nil.