camunda

package module
v0.3.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2022 License: LGPL-3.0-or-later Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PackageVersion        = "{{version}}"
	DefaultUserAgent      = "CamundaClientGo/" + PackageVersion
	DefaultEndpointUrl    = "http://localhost:8080/engine-rest"
	DefaultTimeoutSec     = 60
	DefaultDateTimeFormat = "2006-01-02T15:04:05.000-0700"
)

Variables

View Source
var ErrorNotFound = &Error{
	Type:    "NotFound",
	Message: "Not found",
}

Functions

This section is empty.

Types

type CaseDefinition

type CaseDefinition struct {
	// The id of the case definition
	ID string `json:"id"`
	// The key of the case definition, i.e., the id of the CMMN 2.0 XML case definition
	Key string `json:"key"`
	// The category of the case definition
	Category string `json:"category"`
	// The name of the case definition
	Name string `json:"name"`
	// The version of the case definition that the engine assigned to it
	Version int `json:"Version"`
	// The file name of the case definition
	Resource string `json:"resource"`
	// The deployment id of the case definition
	DeploymentID string `json:"deploymentId"`
	// The tenant id of the case definition
	TenantID string `json:"tenantId"`
	// History time to live value of the case definition. Is used within History cleanup
	HistoryTimeToLive int `json:"historyTimeToLive"`
}

CaseDefinition a JSON object corresponding to the CaseDefinition interface in the engine

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client a client for Camunda API

func NewClient

func NewClient(options *ClientOptions) *Client

NewClient creates new instance of Client

func (*Client) Delete

func (c *Client) Delete(path string, query interface{}) (res *http.Response, err error)

func (*Client) Get

func (c *Client) Get(path string, query interface{}) (res *http.Response, err error)

func (*Client) Marshal

func (c *Client) Marshal(res *http.Response, v interface{}) error

func (*Client) Post

func (c *Client) Post(path string, query interface{}, v interface{}, contentType ...string) (res *http.Response, err error)

func (*Client) ProcessManager

func (c *Client) ProcessManager() *ProcessManager

func (*Client) SetCustomTransport

func (c *Client) SetCustomTransport(customHTTPTransport http.RoundTripper)

SetCustomTransport set new custom transport

func (*Client) TaskManager

func (c *Client) TaskManager() *TaskManager

type ClientOptions

type ClientOptions struct {
	UserAgent   string
	EndpointUrl string
	Timeout     time.Duration
	ApiUser     string
	ApiPassword string
}

ClientOptions a client options

type DecisionDefinition

type DecisionDefinition struct {
	// The id of the decision definition
	ID string `json:"id"`
	// The key of the decision definition, i.e., the id of the DMN 1.0 XML decision definition
	Key string `json:"key"`
	// The category of the decision definition
	Category string `json:"category"`
	// The name of the decision definition
	Name string `json:"name"`
	// The version of the decision definition that the engine assigned to it
	Version int `json:"Version"`
	// The file name of the decision definition
	Resource string `json:"resource"`
	// The deployment id of the decision definition
	DeploymentID string `json:"deploymentId"`
	// The tenant id of the decision definition
	TenantID string `json:"tenantId"`
	// The id of the decision requirements definition this decision definition belongs to
	DecisionRequirementsDefinitionID string `json:"decisionRequirementsDefinitionId"`
	// The key of the decision requirements definition this decision definition belongs to
	DecisionRequirementsDefinitionKey string `json:"decisionRequirementsDefinitionKey"`
	// The version tag of the process definition
	VersionTag string `json:"versionTag"`
	// History time to live value of the decision definition. Is used within History cleanup
	HistoryTimeToLive int `json:"historyTimeToLive"`
}

DecisionDefinition a JSON object corresponding to the DecisionDefinition interface in the engine

type Error

type Error struct {
	Type    string `json:"type"`
	Message string `json:"message"`
}

Error a custom error type

func (*Error) Error

func (e *Error) Error() string

Error error message

type Failure

type Failure struct {
	// The id of the worker that reports the failure.
	// Must match the id of the worker who has most recently Locked the task
	WorkerID string `json:"workerId,omitempty"`
	// An message indicating the reason of the failure
	ErrorMessage string `json:"errorMessage,omitempty"`
	// A detailed error description
	ErrorDetails string `json:"errorDetails,omitempty"`
	// A number of how often the task should be retried.
	// Must be >= 0. If this is 0, an incident is created and the task cannot be fetched anymore unless
	// the retries are increased again. The incident's message is set to the errorMessage parameter
	Retries int `json:"retries,omitempty"`
	// A timeout in milliseconds before the external task becomes available again for fetching. Must be >= 0
	RetryTimeout int `json:"retryTimeout,omitempty"`
}

Failure a query for Failure request

type FetchAndLockRequest

type FetchAndLockRequest struct {
	// Mandatory. The id of the worker on which behalf tasks are fetched. The returned tasks are Locked
	// for that worker and can only be completed when providing the same worker id
	WorkerID string `json:"workerId"`
	// Mandatory. The maximum number of tasks to return
	MaxTasks int `json:"maxTasks"`
	// A boolean value, which indicates whether the task should be fetched based on its priority or arbitrarily
	UsePriority *bool `json:"usePriority,omitempty"`
	// The Long Polling timeout in milliseconds.
	// Note: The value cannot be set larger than 1.800.000 milliseconds (corresponds to 30 minutes)
	AsyncResponseTimeout *int `json:"asyncResponseTimeout,omitempty"`
	// A JSON array of topic objects for which external tasks should be fetched.
	// The returned tasks may be arbitrarily distributed among these topics
	Topics []*TopicLockConfig `json:"topics,omitempty"`
}

FetchAndLockRequest query for FetchAndLock request

type FormVariableFilter

type FormVariableFilter struct {
	// VariableNames A comma-separated list of variable names.
	// Allows restricting the list of requested variables to the variable
	// names in the list.It is best practice to restrict the list of variables
	// to the variables actually required by the form in order to minimize
	// fetching of data.If the query parameter is omitted all variables are
	// fetched.If the query parameter contains non-existent variable names,
	// the variable names are ignored.
	VariableNames string `query:"variableNames,omitempty"`

	// DeserializeValues Determines whether serializable variable values
	// (typically variables that store custom Java objects) should be deserialized
	// on server side (default true).
	//
	// If set to true, a serializable variable will be deserialized on server
	// side and transformed to JSON using Jackson's POJO/bean property introspection
	// feature. Note that this requires the Java classes of the variable value to
	// be on the REST API's classpath.
	//
	// If set to false, a serializable variable will be returned in its serialized
	// format. For example, a variable that is serialized as XML will be returned
	// as a JSON string containing XML.
	//
	// Note: While true is the default value for reasons of backward compatibility,
	// we recommend setting this parameter to false when developing web applications
	// that are independent of the Java process applications deployed to the engine.
	DeserializeValues bool `query:"deserializeValues,omitempty"`
}

FormVariableFilter is a filter for requesting form variables of proc https://docs.camunda.org/manual/latest/reference/rest/process-definition/get-form-variables/#query-parameters

type InstanceParams

type InstanceParams struct {
	// A JSON object containing the variables the process is to be initialized with
	Variables map[string]*Variable `json:"variables,omitempty"`
	// The business key the process instance is to be initialized with.
	// The business key uniquely identifies the process instance in the context of the given process definition
	BusinessKey string `json:"businessKey,omitempty"`
	// The case instance id the process instance is to be initialized with
	CaseInstanceId string `json:"caseInstanceId,omitempty"`
	// Optional. A JSON array of instructions that specify which activities to start the process instance at.
	// If this property is omitted, the process instance starts at its default blank start event
	StartInstructions []*StartInstructionsRequest `json:"startInstructions,omitempty"`
	// Skip execution listener invocation for activities that are started or ended as part of this request
	// Note: This option is currently only respected when start instructions are submitted via
	// the startInstructions property
	SkipCustomListeners bool `json:"skipCustomListeners,omitempty"`
	// Skip execution of input/output variable mappings for activities that are started or ended as part of this request
	// Note: This option is currently only respected when start instructions are submitted via
	// the startInstructions property
	SkipIoMappings bool `json:"skipIoMappings,omitempty"`
	// Indicates if the variables, which was used by the process instance during execution, should be returned. Default value: false
	WithVariablesInReturn bool `json:"withVariablesInReturn,omitempty"`
}

InstanceParams a JSON object with the following properties: (at least an empty JSON object {} or an empty request body)

type MessageManager

type MessageManager struct {
	// contains filtered or unexported fields
}

func NewMessageManager

func NewMessageManager(client *Client) *MessageManager

NewMessageManager initializes the

func (*MessageManager) SendMessage

func (mm *MessageManager) SendMessage(request *MessageRequest) (*SendMessageResponse, error)

SendMessage Correlates a message to the process engine to either trigger a message start event or an intermediate message catching event. Internally this maps to the engine’s message correlation builder methods MessageCorrelationBuilder#correlateWithResult() and MessageCorrelationBuilder#correlateAllWithResult(). For more information about the correlation behavior, see the Message Events section of the BPMN 2.0 Implementation Reference.

type MessageRequest

type MessageRequest struct {
	// MessageName	The name of the message to deliver.
	MessageName string `json:"messageName"`
	// BusinessKey	Used for correlation of process instances that wait for incoming messages.
	// Will only correlate to executions that belong to a process instance with the provided business key.
	// If the message triggers a start event, the business key is set in the process instance.
	BusinessKey string `json:"businessKey"`
	// TenantID	Used to correlate the message for a tenant with the given id. Will only correlate to executions and
	// process definitions which belong to the tenant. Must not be supplied in conjunction with a withoutTenantId.
	TenantID string `json:"tenantId,omitempty"`
	// WithoutTenantID A Boolean value that indicates whether the message should only be correlated to executions and
	// process definitions which belong to no tenant or not.
	// Value may only be true, as false is the default behavior.Must not be supplied in conjunction with a tenantId.
	WithoutTenantID string `json:"withoutTenantId,omitempty"`
	// ProcessInstanceID    Used to correlate the message to the process instance with the given id.
	ProcessInstanceID string `json:"processInstanceId,omitempty"`
	// CorrelationKeys Used for correlation of process instances that wait for incoming messages.
	// Has to be a JSON object containing key-value pairs that are matched against process instance variables during
	// correlation.Each key is a variable name and each value a JSON variable value object with the following
	// properties.
	CorrelationKeys Variables `json:"correlationKeys,omitempty"`
	// LocalCorrelationKeys Local variables used for correlation of executions (process instances) that wait for
	// incoming messages. Has to be a JSON object containing key-value pairs that are matched against local variables
	// during correlation.Each key is a variable name and each value a JSON variable value object with the following
	// properties.
	LocalCorrelationKeys Variables `json:"localCorrelationKeys,omitempty"`
	// ProcessVariables A map of variables that is injected into the triggered execution or process instance after
	// the message has been delivered. Each key is a variable name and each value a JSON variable value object with the
	// following properties.
	ProcessVariables Variables `json:"processVariables,omitempty"`
	// ProcessVariablesLocal    A map of local variables that is injected into the triggered execution or process
	// instance after the message has been delivered.Each key is a variable name and each value a JSON variable value
	// object with the following properties.
	ProcessVariablesLocal Variables `json:"processVariablesLocal"`
	// All A Boolean value that indicates whether the message should be correlated to exactly one entity or multiple
	// entities. If the value is set to false, the message will be correlated to exactly one entity (execution or
	// process definition).If the value is set to true, the message will be correlated to multiple executions and a
	// process definition that can be instantiated by this message in one go.
	All bool `json:"all,omitempty"`
	// ResultEnabled A Boolean value that indicates whether the result of the correlation should be returned or not.
	// If this property is set to true, there will be returned a list of message correlation result objects. Depending
	// on the all property, there will be either one ore more returned results in the list.
	// The default value is false, which means no result will be returned.
	ResultEnabled bool `json:"resultEnabled"`
	// VariablesInResultEnabled    A Boolean value that indicates whether the result of the correlation should contain
	// process variables or not.The parameter resultEnabled should be set to true in order to use this it.
	// The default value is false, which means the variables will not be returned.
	VariablesInResultEnabled bool `json:"variablesInResultEnabled"`
}

type ProcessConfig

type ProcessConfig struct {
	Id       string
	Key      string
	TenantId string
}

ProcessConfig path builder

func (*ProcessConfig) Path

func (q *ProcessConfig) Path() string

Path a build path part

type ProcessDefinition

type ProcessDefinition struct {
	// The id of the process definition
	Id string `json:"id"`
	// The id of the process definition
	DefinitionId string `json:"definitionId"`
	// The business key of the process instance
	BusinessKey string `json:"businessKey"`
	// The case instance id of the process instance
	CaseInstanceId string `json:"caseInstanceId"`
	// The tenant id of the process instance
	TenantId string `json:"tenantId"`
	// A flag indicating whether the instance is still running or not
	Ended bool `json:"ended"`
	// A flag indicating whether the instance is suspended or not
	Suspended bool `json:"suspended"`
	// A JSON array containing links to interact with the instance
	Links []ResLink `json:"links"`
	// A JSON object containing a property for each of the latest variables
	Variables map[string]Variable `json:"variables"`
}

ProcessDefinition ProcessDefinition for started

type ProcessDefinitionResponse

type ProcessDefinitionResponse struct {
	// The id of the process definition
	ID string `json:"id"`
	// The key of the process definition, i.e., the id of the BPMN 2.0 XML process definition
	Key string `json:"key"`
	// The category of the process definition
	Category string `json:"category"`
	// The description of the process definition
	Description string `json:"description"`
	// The name of the process definition
	Name string `json:"name"`
	// The version of the process definition that the engine assigned to it
	Version int `json:"Version"`
	// The file name of the process definition
	Resource string `json:"resource"`
	// The deployment id of the process definition
	DeploymentID string `json:"deploymentId"`
	// The file name of the process definition diagram, if it exists
	Diagram string `json:"diagram"`
	// A flag indicating whether the definition is suspended or not
	Suspended bool `json:"suspended"`
	// The tenant id of the process definition
	TenantID string `json:"tenantId"`
	// The version tag of the process definition
	VersionTag string `json:"versionTag"`
	// History time to live value of the process definition. Is used within History cleanup
	HistoryTimeToLive int `json:"historyTimeToLive"`
	// A flag indicating whether the process definition is startable in Tasklist or not
	StartableInTaskList bool `json:"startableInTasklist"`
}

ProcessDefinitionResponse a JSON object corresponding to the ProcessDefinition interface in the engine

type ProcessInstance

type ProcessInstance struct {
	// id	String	The id of the process instance.
	ID string `json:"id"`
	// definitionId	String	The id of the process definition that this process instance belongs to.
	DefinitionID string `json:"definitionId,omitempty"`
	// businessKey	String	The business key of the process instance.
	BusinessKey string `json:"businessKey,omitempty"`
	// caseInstanceId	String	The id of the case instance associated with the process instance.
	CaseInstanceID string `json:"caseInstanceId,omitempty"`
	// suspended	Boolean	A flag indicating whether the process instance is suspended or not.
	Suspended bool `json:"suspended,omitempty"`
	// tenantId	String	The tenant id of the process instance.
	TenantID string `json:"tenantId,omitempty"`
}

ProcessInstance A JSON array of process instance objects. Each process instance object has the following properties:

type ProcessInstanceQuery

type ProcessInstanceQuery struct {
	// ProcessInstanceIDs	Filter by a comma-separated list of process instance ids.
	ProcessInstanceIDs []string `url:"processInstanceIds,omitempty"`
	// BusinessKey	Filter by process instance business key.
	BusinessKey string `url:"businessKey,omitempty"`
	// BusinessKeyLike	Filter by process instance business key that the parameter is a substring of.
	BusinessKeyLike string `url:"businessKeyLike,omitempty"`
	// CaseInstanceID	Filter by case instance id.
	CaseInstanceID string `url:"caseInstanceId,omitempty"`
	//processDefinitionId	Filter by the process definition the instances run on.
	//processDefinitionKey	Filter by the key of the process definition the instances run on.
	//processDefinitionKeyIn	Filter by a comma-separated list of process definition keys. A process instance must have one of the given process definition keys.
	//processDefinitionKeyNotIn	Exclude instances by a comma-separated list of process definition keys. A process instance must not have one of the given process definition keys.
	//deploymentId	Filter by the deployment the id belongs to.
	//superProcessInstance	Restrict query to all process instances that are sub process instances of the given process instance. Takes a process instance id.
	//subProcessInstance	Restrict query to all process instances that have the given process instance as a sub process instance. Takes a process instance id.
	//superCaseInstance	Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id.
	//subCaseInstance	Restrict query to all process instances that have the given case instance as a sub case instance. Takes a case instance id.
	//active	Only include active process instances. Value may only be true, as false is the default behavior.
	//suspended	Only include suspended process instances. Value may only be true, as false is the default behavior.
	//withIncident	Filter by presence of incidents. Selects only process instances that have an incident.
	//incidentId	Filter by the incident id.
	//incidentType	Filter by the incident type. See the User Guide for a list of incident types.
	//incidentMessage	Filter by the incident message. Exact match.
	//incidentMessageLike	Filter by the incident message that the parameter is a substring of.
	//tenantIdIn	Filter by a comma-separated list of tenant ids. A process instance must have one of the given tenant ids.
	TenantIDIn []string `json:"tenantIdIn"`
}

ProcessInstanceQuery query struct for process instance

type ProcessManager

type ProcessManager struct {
	// contains filtered or unexported fields
}

ProcessManager a client for ProcessManager

func (*ProcessManager) ActivateOrSuspendById

func (p *ProcessManager) ActivateOrSuspendById(by ProcessConfig, req ReqActivateOrSuspendById) error

ActivateOrSuspendById activates or suspends a given process definition by id or by latest version of process definition key

func (*ProcessManager) ActivateOrSuspendByKey

func (p *ProcessManager) ActivateOrSuspendByKey(req ReqActivateOrSuspendByKey) error

ActivateOrSuspendByKey activates or suspends process definitions with the given process definition key

func (*ProcessManager) Delete

func (p *ProcessManager) Delete(by ProcessConfig, query map[string]string) error

Delete deletes a process definition from a deployment by id https://docs.camunda.org/manual/latest/reference/rest/process-definition/delete-process-definition/#query-parameters

func (*ProcessManager) Get

func (p *ProcessManager) Get(by ProcessConfig) (processDefinition *ProcessDefinitionResponse, err error)

Get retrieves a process definition according to the ProcessDefinition interface in the engine

func (*ProcessManager) GetActivityInstanceStatistics

func (p *ProcessManager) GetActivityInstanceStatistics(by ProcessConfig, query map[string]string) (statistic []*ResActivityInstanceStatistics, err error)

GetActivityInstanceStatistics retrieves runtime statistics of a given process definition, grouped by activities. These statistics include the number of running activity instances, optionally the number of failed jobs and also optionally the number of incidents either grouped by incident types or for a specific incident type. Note: This does not include historic data https://docs.camunda.org/manual/latest/reference/rest/process-definition/get-activity-statistics/#query-parameters

func (*ProcessManager) GetDeployedStartForm

func (p *ProcessManager) GetDeployedStartForm(by ProcessConfig) (htmlForm string, err error)

GetDeployedStartForm retrieves the deployed form that can be referenced from a start event. For further information please refer to User Guide

func (*ProcessManager) GetDiagram

func (p *ProcessManager) GetDiagram(by ProcessConfig) (data []byte, err error)

GetDiagram retrieves the diagram of a process definition. If the process definition’s deployment contains an image resource with the same file name as the process definition, the deployed image will be returned by the Get Diagram endpoint. Example: someProcess.bpmn and someProcess.png. Supported file extentions for the image are: svg, png, jpg, and gif

func (*ProcessManager) GetInstanceVars

func (p *ProcessManager) GetInstanceVars(instanceId string) (Variables, error)

GetInstanceVars Retrieves all variables of a given process instance by id.

func (*ProcessManager) GetList

func (p *ProcessManager) GetList(query map[string]string) (processDefinitions []*ProcessDefinitionResponse, err error)

GetList queries for process definitions that fulfill given parameters. Parameters may be the properties of process definitions, such as the name, key or version. The size of the result set can be retrieved by using the Get Definition Count method https://docs.camunda.org/manual/latest/reference/rest/process-definition/get-query/#query-parameters

func (*ProcessManager) GetListCount

func (p *ProcessManager) GetListCount(query map[string]string) (count int, err error)

GetListCount requests the number of process definitions that fulfill the query criteria. Takes the same filtering parameters as the Get Definitions method https://docs.camunda.org/manual/latest/reference/rest/process-definition/get-query-count/#query-parameters

func (*ProcessManager) GetProcessInstanceStatistics

func (p *ProcessManager) GetProcessInstanceStatistics(query map[string]string) (statistic []*ResInstanceStatistics, err error)

GetProcessInstanceStatistics retrieves runtime statistics of the process engine, grouped by process definitions. These statistics include the number of running process instances, optionally the number of failed jobs and also optionally the number of incidents either grouped by incident types or for a specific incident type. Note: This does not include historic data https://docs.camunda.org/manual/latest/reference/rest/process-definition/get-statistics/#query-parameters

func (*ProcessManager) GetRenderedStartForm

func (p *ProcessManager) GetRenderedStartForm(by ProcessConfig) (htmlForm string, err error)

GetRenderedStartForm retrieves the rendered form for a process definition. This method can be used for getting the HTML rendering of a Generated Task Form

func (*ProcessManager) GetStartFormKey

func (p *ProcessManager) GetStartFormKey(by ProcessConfig) (resp *ResGetStartFormKey, err error)

GetStartFormKey retrieves the key of the start form for a process definition. The form key corresponds to the FormData#formKey property in the engine

func (*ProcessManager) GetStartFormVariables

func (p *ProcessManager) GetStartFormVariables(by ProcessConfig, filter *FormVariableFilter) (variables map[string]Variable, err error)

GetStartFormVariables Retrieves the start form variables for a process definition (only if they are defined via the Generated Task Form approach). The start form variables take form data specified on the start event into account. If form fields are defined, the variable types and default values of the form fields are taken into account https://docs.camunda.org/manual/latest/reference/rest/process-definition/get-form-variables/#query-parameters

func (*ProcessManager) GetXML

func (p *ProcessManager) GetXML(by ProcessConfig) (resp *ResBPMNProcessDefinition, err error)

GetXML retrieves the BPMN 2.0 XML of a process definition

func (*ProcessManager) ListInstances

func (p *ProcessManager) ListInstances(q ProcessInstanceQuery) ([]*ProcessInstance, error)

ListInstances Queries for process instances that fulfill given parameters. Parameters may be static as well as dynamic runtime properties of process instances. The size of the result set can be retrieved by using the Get Instance Count method.

func (*ProcessManager) RestartProcessInstance

func (p *ProcessManager) RestartProcessInstance(id string, req RestartInstanceRequest) error

RestartProcessInstance restarts process instances that were canceled or terminated synchronously. To execute the restart asynchronously, use the Restart Process Instance Async method For more information about the difference between synchronous and asynchronous execution, please refer to the related section of the user guide

func (*ProcessManager) RestartProcessInstanceAsync

func (p *ProcessManager) RestartProcessInstanceAsync(id string, req RestartInstanceRequest) (resp *ResBatch, err error)

RestartProcessInstanceAsync restarts process instances that were canceled or terminated asynchronously. To execute the restart synchronously, use the Restart Process Instance method For more information about the difference between synchronous and asynchronous execution, please refer to the related section of the user guide

func (*ProcessManager) StartInstance

func (p *ProcessManager) StartInstance(config ProcessConfig, req InstanceParams) (pd *ProcessDefinition, err error)

StartInstance instantiates a given process definition. Process variables and business key may be supplied in the request body

func (*ProcessManager) SubmitStartForm

func (p *ProcessManager) SubmitStartForm(by ProcessConfig, req ReqSubmitStartForm) (reps *ResSubmitStartForm, err error)

SubmitStartForm starts a process instance using a set of process variables and the business key. If the start event has Form Field Metadata defined, the process engine will perform backend validation for any form fields which have validators defined. See Documentation on Generated Task Forms

func (*ProcessManager) UpdateHistoryTimeToLive

func (p *ProcessManager) UpdateHistoryTimeToLive(by ProcessConfig, historyTimeToLive int) error

UpdateHistoryTimeToLive updates history time to live for process definition. The field is used within History cleanup

type QueryComplete

type QueryComplete struct {
	// The id of the worker that completes the task.
	// Must match the id of the worker who has most recently Locked the task
	WorkerID *string `json:"workerId,omitempty"`
	// A JSON object containing variable key-value pairs
	Variables Variables `json:"variables"`
	// A JSON object containing variable key-value pairs.
	// Local variables are set only in the scope of external task
	LocalVariables Variables `json:"localVariables"`
}

QueryComplete a query for Complete request

type QueryExtendLock

type QueryExtendLock struct {
	//	An amount of time (in milliseconds). This is the new lock duration starting from the current moment
	NewDuration int `json:"newDuration,omitempty"`
	// The ID of a worker who is locking the external task
	WorkerID string `json:"workerId,omitempty"`
}

QueryExtendLock a query for ExtendLock request

type QueryGetListPost

type QueryGetListPost struct {
	// Filter by an external task's id
	ExternalTaskID *string `json:"externalTaskId,omitempty"`
	// Filter by an external task topic
	TopicName *string `json:"topicName,omitempty"`
	// Filter by the id of the worker that the task was most recently Locked by
	WorkerID *string `json:"workerID,omitempty"`
	// Only include external tasks that are currently Locked (i.e., they have a lock time and it has not expired).
	// Value may only be true, as false matches any external task
	Locked *bool `json:"Locked,omitempty"`
	// Only include external tasks that are currently not Locked (i.e., they have no lock or it has expired).
	// Value may only be true, as false matches any external task
	NotLocked *bool `json:"NotLocked,omitempty"`
	// Only include external tasks that have a positive (> 0) number of retries (or null). Value may only be true,
	// as false matches any external task
	WithRetriesLeft *bool `json:"WithRetriesLeft,omitempty"`
	// Only include external tasks that have 0 retries. Value may only be true, as false matches any external task
	NoRetriesLeft *bool `json:"NoRetriesLeft,omitempty"`
	// Restrict to external tasks that have a lock that expires after a given date. By default*,
	// the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200
	LockExpirationAfter *Time `json:"lockExpirationAfter,omitempty"`
	// Restrict to external tasks that have a lock that expires before a given date. By default*,
	// the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200
	LockExpirationBefore *Time `json:"lockExpirationBefore,omitempty"`
	// Filter by the id of the activity that an external task is created for
	ActivityID *string `json:"activityId,omitempty"`
	// Filter by the comma-separated list of ids of the activities that an external task is created for
	ActivityIDIn *string `json:"activityIdIn,omitempty"`
	// Filter by the id of the execution that an external task belongs to
	ExecutionID *string `json:"executionId,omitempty"`
	// Filter by the id of the process instance that an external task belongs to
	ProcessInstanceID *string `json:"processInstanceId,omitempty"`
	// Filter by the id of the process definition that an external task belongs to
	ProcessDefinitionID *string `json:"processDefinitionId,omitempty"`
	// Filter by a comma-separated list of tenant ids. An external task must have one of the given tenant ids
	TenantIDIn []string `json:"tenantIdIn,omitempty"`
	// Only include active tasks. Value may only be true, as false matches any external task
	Active *bool `json:"active,omitempty"`
	// Only include suspended tasks. Value may only be true, as false matches any external task
	Suspended *bool `json:"suspended,omitempty"`
	// Only include jobs with a priority higher than or equal to the given value. Value must be a valid long value
	PriorityHigherThanOrEquals *int `json:"priorityHigherThanOrEquals,omitempty"`
	// Only include jobs with a priority lower than or equal to the given value. Value must be a valid long value
	PriorityLowerThanOrEquals *int `json:"priorityLowerThanOrEquals,omitempty"`
	// A JSON array of criteria to sort the result by. Each element of the array is a JSON object
	// that specifies one ordering. The position in the array identifies the rank of an ordering,
	// i.e., whether it is primary, secondary, etc.
	Sorting *QueryListPostSorting `json:"sorting,omitempty"`
}

QueryGetListPost a query for ListPost request

type QueryHandleBPMNError

type QueryHandleBPMNError struct {
	// The id of the worker that reports the failure.
	// Must match the id of the worker who has most recently Locked the task
	WorkerID string `json:"workerId"`
	// An error code that indicates the predefined error. Is used to identify the BPMN error handler
	ErrorCode string `json:"errorCode"`
	// An error message that describes the error
	ErrorMessage string `json:"errorMessage"`
	// A JSON object containing the variables which will be passed to the execution.
	// Each key corresponds to a variable name and each value to a variable value
	Variables Variables `json:"variables,omitempty"`
}

QueryHandleBPMNError a query for HandleBPMNError request

type QueryListPostSorting

type QueryListPostSorting struct {
	// Mandatory. Sort the results lexicographically by a given criterion. Valid values are id, lockExpirationTime,
	// processInstanceId, processDefinitionId, processDefinitionKey, taskPriority and tenantId
	SortBy string `json:"sortBy"`
	// Mandatory. Sort the results in a given order. Values may be asc for ascending order or desc for descending order
	SortOrder string `json:"sortOrder"`
}

QueryListPostSorting a JSON array of criteria to sort the result by

type QuerySetRetriesAsync

type QuerySetRetriesAsync struct {
	// The number of retries to set for the external task. Must be >= 0. If this is 0, an incident is created and the
	// task cannot be fetched anymore unless the retries are increased again. Can not be null
	Retries int `json:"retries"`
	// The ids of the external tasks to set the number of retries for
	ExternalTaskIds *string `json:"externalTaskIds,omitempty"`
	// The ids of process instances containing the tasks to set the number of retries for
	ProcessInstanceIds *string `json:"processInstanceIds,omitempty"`
	// Query for the external tasks to set the number of retries for
	ExternalTaskQuery *string `json:"externalTaskQuery,omitempty"`
	// Query for the process instances containing the tasks to set the number of retries for
	ProcessInstanceQuery *string `json:"processInstanceQuery,omitempty"`
	// Query for the historic process instances containing the tasks to set the number of retries for
	HistoricProcessInstanceQuery *string `json:"historicProcessInstanceQuery,omitempty"`
}

QuerySetRetriesAsync a query for SetRetriesAsync request

type QuerySetRetriesSync

type QuerySetRetriesSync struct {
	// The number of retries to set for the external task. Must be >= 0. If this is 0, an incident is created
	// and the task cannot be fetched anymore unless the retries are increased again. Can not be null
	Retries int `json:"retries"`
	// The ids of the external tasks to set the number of retries for
	ExternalTaskIds *string `json:"externalTaskIds,omitempty"`
	// The ids of process instances containing the tasks to set the number of retries for
	ProcessInstanceIds *string `json:"processInstanceIds,omitempty"`
	// Query for the external tasks to set the number of retries for
	ExternalTaskQuery *string `json:"externalTaskQuery,omitempty"`
	// Query for the process instances containing the tasks to set the number of retries for
	ProcessInstanceQuery *string `json:"processInstanceQuery,omitempty"`
	// Query for the historic process instances containing the tasks to set the number of retries for
	HistoricProcessInstanceQuery *string `json:"historicProcessInstanceQuery,omitempty"`
}

QuerySetRetriesSync a query for SetRetriesSync request

type QueryUserTaskComplete

type QueryUserTaskComplete struct {
	// A JSON object containing variable key-value pairs
	Variables map[string]Variable `json:"variables"`
}

QueryUserTaskComplete a query for Complete user task request

type ReqActivateOrSuspendById

type ReqActivateOrSuspendById struct {
	// A Boolean value which indicates whether to activate or suspend a given process definition. When the value
	// is set to true, the given process definition will be suspended and when the value is set to false,
	// the given process definition will be activated
	Suspended *bool `json:"suspended,omitempty"`
	// A Boolean value which indicates whether to activate or suspend also all process instances of the given process
	// definition. When the value is set to true, all process instances of the provided process definition will be
	// activated or suspended and when the value is set to false, the suspension state of all process instances of
	// the provided process definition will not be updated
	IncludeProcessInstances *bool `json:"includeProcessInstances,omitempty"`
	// The date on which the given process definition will be activated or suspended. If null, the suspension state
	// of the given process definition is updated immediately. The date must have the format yyyy-MM-dd'T'HH:mm:ss,
	// e.g., 2013-01-23T14:42:45
	ExecutionDate *Time `json:"executionDate,omitempty"`
}

ReqActivateOrSuspendById response ActivateOrSuspendById

type ReqActivateOrSuspendByKey

type ReqActivateOrSuspendByKey struct {
	// The key of the process definitions to activate or suspend
	ProcessDefinitionKey string `json:"processDefinitionKey"`
	// A Boolean value which indicates whether to activate or suspend a given process definition. When the value
	// is set to true, the given process definition will be suspended and when the value is set to false,
	// the given process definition will be activated
	Suspended *bool `json:"suspended,omitempty"`
	// A Boolean value which indicates whether to activate or suspend also all process instances of the given process
	// definition. When the value is set to true, all process instances of the provided process definition will be
	// activated or suspended and when the value is set to false, the suspension state of all process instances of
	// the provided process definition will not be updated
	IncludeProcessInstances *bool `json:"includeProcessInstances,omitempty"`
	// The date on which the given process definition will be activated or suspended. If null, the suspension state
	// of the given process definition is updated immediately. The date must have the format yyyy-MM-dd'T'HH:mm:ss,
	// e.g., 2013-01-23T14:42:45
	ExecutionDate *Time `json:"executionDate,omitempty"`
}

ReqActivateOrSuspendByKey response ActivateOrSuspendByKey

type ReqSubmitStartForm

type ReqSubmitStartForm struct {
	// A JSON object containing the variables the process is to be initialized with.
	// Each key corresponds to a variable name and each value to a variable value
	Variables map[string]Variable `json:"variables"`
	// A JSON object containing the business key the process is to be initialized with.
	// The business key uniquely identifies the process instance in the context of the given process definition
	BusinessKey string `json:"businessKey"`
}

ReqSubmitStartForm request a SubmitStartForm

type ResActivityInstanceStatistics

type ResActivityInstanceStatistics struct {
	// The id of the activity the results are aggregated for
	Id string `json:"id"`
	// The total number of running instances of this activity
	Instances int `json:"instances"`
	// Number	The total number of failed jobs for the running instances.
	// Note: Will be 0 (not null), if failed jobs were excluded
	FailedJobs int `json:"failedJobs"`
	// Each item in the resulting array is an object which contains the following properties
	Incidents []ResActivityInstanceStatisticsIncident `json:"incidents"`
}

ResActivityInstanceStatistics a JSON array containing statistics results per activity

type ResActivityInstanceStatisticsIncident

type ResActivityInstanceStatisticsIncident struct {
	// The type of the incident the number of incidents is aggregated for.
	// See the User Guide for a list of incident types
	IncidentType string `json:"incidentType"`
	// The total number of incidents for the corresponding incident type
	IncidentCount int `json:"incidentCount"`
}

ResActivityInstanceStatisticsIncident a statistics incident

type ResBPMNProcessDefinition

type ResBPMNProcessDefinition struct {
	// The id of the process definition
	Id string `json:"id"`
	// An escaped XML string containing the XML that this definition was deployed with.
	// Carriage returns, line feeds and quotation marks are escaped
	Bpmn20Xml string `json:"bpmn20Xml"`
}

ResBPMNProcessDefinition a JSON object containing the id of the definition and the BPMN 2.0 XML

type ResBatch

type ResBatch struct {
	// The id of the created batch
	ID string `json:"id"`
	// The type of the created batch
	Type string `json:"type"`
	// The total jobs of a batch is the number of batch execution jobs required to complete the batch
	TotalJobs int `json:"totalJobs"`
	// The number of batch execution jobs created per seed job invocation. The batch seed job is invoked until
	// it has created all batch execution jobs required by the batch (see totalJobs property)
	BatchJobsPerSeed int `json:"batchJobsPerSeed"`
	// Every batch execution job invokes the command executed by the batch invocationsPerBatchJob times.
	// E.g., for a process instance migration batch this specifies the number of process instances which are
	// migrated per batch execution job
	InvocationsPerBatchJob int `json:"invocationsPerBatchJob"`
	// The job definition id for the seed jobs of this batch
	SeedJobDefinitionID string `json:"seedJobDefinitionId"`
	// The job definition id for the monitor jobs of this batch
	MonitorJobDefinitionID string `json:"monitorJobDefinitionId"`
	// The job definition id for the batch execution jobs of this batch
	BatchJobDefinitionID string `json:"batchJobDefinitionId"`
	// The tenant id of the batch
	TenantID string `json:"tenantId"`
}

ResBatch a JSON object corresponding to the Batch interface in the engine

type ResDecisionRequirementsDefinition

type ResDecisionRequirementsDefinition struct {
	// The id of the decision requirements definition
	ID string `json:"id"`
	// The key of the decision requirements definition, i.e., the id of the DMN 1.1 XML decision definition
	Key string `json:"key"`
	// The category of the decision requirements definition
	Category string `json:"category"`
	// The name of the decision requirements definition
	Name string `json:"name"`
	// The version of the decision requirements definition that the engine assigned to it
	Version int `json:"Version"`
	// The file name of the decision requirements definition
	Resource string `json:"resource"`
	// The deployment id of the decision requirements definition
	DeploymentID string `json:"deploymentId"`
	// The tenant id of the decision requirements definition
	TenantId string `json:"tenantId"`
}

ResDecisionRequirementsDefinition a JSON object corresponding to the DecisionRequirementsDefinition interface in the engine

type ResExternalTask

type ResExternalTask struct {
	TaskBase
	// The business key of the process instance the external task belongs to
	BusinessKey string `json:"businessKey"`
}

ResExternalTask a TaskManager response

type ResGetStartFormKey

type ResGetStartFormKey struct {
	// The form key for the process definition
	Key string `json:"key"`
	// The context path of the process application
	ContextPath string `json:"contextPath"`
}

ResGetStartFormKey a response from GetStartFormKey method

type ResInstanceStatistics

type ResInstanceStatistics struct {
	// The id of the activity the results are aggregated for
	Id string `json:"id"`
	// The total number of running instances of this activity
	Instances int `json:"instances"`
	// Number	The total number of failed jobs for the running instances.
	// Note: Will be 0 (not null), if failed jobs were excluded
	FailedJobs int `json:"failedJobs"`
	// The process definition with the properties as described in the Get single definition method
	Definition ProcessDefinitionResponse `json:"definition"`
	// Each item in the resulting array is an object which contains the following properties
	Incidents []ResActivityInstanceStatisticsIncident `json:"incidents"`
}

ResInstanceStatistics a JSON array containing statistics results per process definition

type ResLink struct {
	Method string `json:"method"`
	Href   string `json:"href"`
	Rel    string `json:"rel"`
}

ResLink a link struct

type ResLockedExternalTask

type ResLockedExternalTask struct {
	// TaskBase
	*TaskBase
	// The business key of the process instance the external task belongs to
	BusinessKey string `json:"businessKey"`
	// A JSON object containing a property for each of the requested variables
	Variables Variables `json:"variables"`
}

ResLockedExternalTask a response FetchAndLock method.

type ResSubmitStartForm

type ResSubmitStartForm struct {
	Links        []ResLink `json:"links"`
	Id           string    `json:"id"`
	DefinitionId string    `json:"definitionId"`
	BusinessKey  string    `json:"businessKey"`
	Ended        bool      `json:"ended"`
	Suspended    bool      `json:"suspended"`
}

ReqSubmitStartForm response rrom SubmitStartForm method

type ResponseCount

type ResponseCount struct {
	Count int `json:"count"`
}

ResponseCount a count response

type RestartInstanceRequest

type RestartInstanceRequest struct {
	// A list of process instance ids to restart
	ProcessInstanceIds *string `json:"processInstanceIds,omitempty"`
	// A historic process instance query like the request body described by POST /history/process-instance
	HistoricProcessInstanceQuery *string `json:"historicProcessInstanceQuery,omitempty"`
	// Optional. A JSON array of instructions that specify which activities to start the process instance at.
	// If this property is omitted, the process instance starts at its default blank start event
	StartInstructions []*StartInstructionsRequest `json:"startInstructions,omitempty"`
	// Skip execution listener invocation for activities that are started or ended as part of this request
	// Note: This option is currently only respected when start instructions are submitted via
	// the startInstructions property
	SkipCustomListeners *bool `json:"skipCustomListeners,omitempty"`
	// Skip execution of input/output variable mappings for activities that are started or ended as part of this request
	// Note: This option is currently only respected when start instructions are submitted via
	// the startInstructions property
	SkipIoMappings *bool `json:"skipIoMappings,omitempty"`
	// Set the initial set of variables during restart. By default, the last set of variables is used
	InitialVariables *bool `json:"initialVariables,omitempty"`
	// Do not take over the business key of the historic process instance.
	WithoutBusinessKey *bool `json:"withoutBusinessKey,omitempty"`
}

RestartInstanceRequest a request to restart instance

type SendMessageResponse

type SendMessageResponse struct {
	// ResultType String Indicates if the message was correlated to a message start event or an intermediate message
	// catching event. In the first case, the resultType is ProcessDefinition and otherwise Execution.
	ResultType string `json:"resultType,omitempty"`
	// ProcessInstance	Object	This property only has a value if the resultType is set to ProcessDefinition.
	// The processInstance with the properties as described in the get single instance method.
	ProcessInstance string `json:"processInstance,omitempty"`
	// Execution Object	This property only has a value if the resultType is set to Execution. The execution
	// with the properties as described in the get single execution method.
	Execution interface{} `json:"execution,omitempty"`
	// Variables This property is returned if the variablesInResultEnabled is set to true.
	// Contains a list of the process variables.
	Variables Variables
}

type StartInstructionsRequest

type StartInstructionsRequest struct {
	// Mandatory. One of the following values: startBeforeActivity, startAfterActivity, startTransition.
	// A startBeforeActivity instruction requests to start execution before entering a given activity.
	// A startAfterActivity instruction requests to start at the single outgoing sequence flow of a given activity.
	// A startTransition instruction requests to execute a specific sequence flow
	Type string `json:"type"`
	// Can be used with instructions of types startBeforeActivity and startAfterActivity.
	// Specifies the activity the instruction targets
	ActivityId *string `json:"activityId,omitempty"`
	// Can be used with instructions of types startTransition. Specifies the sequence flow to start
	TransitionId *string `json:"transitionId,omitempty"`
	// Can be used with instructions of type startBeforeActivity, startAfterActivity, and startTransition.
	// A JSON object containing variable key-value pairs
	Variables *map[string]VariableSet `json:"variables,omitempty"`
}

StartInstructionsRequest a JSON array of instructions that specify which activities to start the process instance at

type TaskBase

type TaskBase struct {
	// The id of the activity that this external task belongs to
	ActivityID string `json:"activityId"`
	// The id of the activity instance that the external task belongs to
	ActivityInstanceID string `json:"activityInstanceId"`
	// The full error message submitted with the latest reported failure executing this task;
	// null if no failure was reported previously or if no error message was submitted
	ErrorMessage string `json:"errorMessage"`
	// The error message that was supplied when the last failure of this task was reported.
	ErrorDetails string `json:"errorDetails"`
	// The id of the execution that the external task belongs to.
	ExecutionID string `json:"executionId"`
	// The id of the external task.
	ID string `json:"id"`
	// The date that the task's most recent lock expires or has expired
	LockExpirationTime string `json:"lockExpirationTime"`
	// The id of the process definition the external task is defined in
	ProcessDefinitionID string `json:"processDefinitionId"`
	// The key of the process definition the external task is defined in
	ProcessDefinitionKey string `json:"processDefinitionKey"`
	// The id of the process instance the external task belongs to
	ProcessInstanceID string `json:"processInstanceId"`
	// The id of the tenant the external task belongs to
	TenantID string `json:"tenantId"`
	// The number of retries the task currently has left
	Retries int `json:"retries"`
	// A flag indicating whether the external task is suspended or not
	Suspended bool `json:"suspended"`
	// The id of the worker that possesses or possessed the most recent lock
	WorkerID string `json:"workerId"`
	// The priority of the external task
	Priority int `json:"priority"`
	// The topic name of the external task
	TopicName string `json:"topicName"`
}

type TaskFilter

type TaskFilter struct {
	// ExternalTaskId filter by an external task's id.
	ExternalTaskId string `url:"externalTaskId,omitempty"`
	// ExternalTaskIDIn Filter by the comma-separated list of external task ids.
	ExternalTaskIDIn string `url:"externalTaskIDIn,omitempty"`
	// TopicName Filter by an external task topic.
	TopicName string `url:"topicName,omitempty"`
	// WorkerID Filter by the id of the worker that the task was most recently Locked by.
	WorkerID string `url:"workerId,omitempty"`
	// Locked Only include external tasks that are currently Locked (i.e., they have a lock time and it has not expired). Value may only be true, as false matches any external task.
	Locked string `url:"locked,omitempty"`
	// NotLocked Only include external tasks that are currently not Locked (i.e., they have no lock or it has expired). Value may only be true, as false matches any external task.
	NotLocked string `url:"notLocked,omitempty"`
	// WithRetriesLeft Only include external tasks that have a positive (> 0) number of retries (or null). Value may only be true, as false matches any external task.
	WithRetriesLeft string `url:"withRetriesLeft,omitempty"`
	// NoRetriesLeft Only include external tasks that have 0 retries. Value may only be true, as false matches any external task.
	NoRetriesLeft string `url:"noRetriesLeft,omitempty"`
	// LockExpirationAfter Restrict to external tasks that have a lock that expires after a given date. By default*, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
	LockExpirationAfter string `url:"lockExpirationAfter,omitempty"`
	// LockExpirationBefore Restrict to external tasks that have a lock that expires before a given date. By default*, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
	LockExpirationBefore string `url:"lockExpirationBefore,omitempty"`
	// ActivityID Filter by the id of the activity that an external task is created for.
	ActivityID string `url:"activityId,omitempty"`
	// ActivityIDIn Filter by the comma-separated list of ids of the activities that an external task is created for.
	ActivityIDIn string `url:"activityIdIn,omitempty"`
	// ExecutionId Filter by the id of the execution that an external task belongs to.
	ExecutionId string `url:"executionId,omitempty"`
	// ProcessInstanceID Filter by the id of the process instance that an external task belongs to.
	ProcessInstanceID string `url:"processInstanceId,omitempty"`
	// ProcessDefinitionID Filter by the id of the process definition that an external task belongs to.
	ProcessDefinitionID string `url:"processDefinitionId,omitempty"`
	// TenantIDIn Filter by a comma-separated list of tenant ids. An external task must have one of the given tenant ids.
	TenantIDIn []string `url:"tenantIdIn,omitempty"`
	// Active Only include active tasks. Value may only be true, as false matches any external task.
	Active string `url:"active,omitempty"`
	// PriorityHigherThanOrEquals Only include jobs with a priority higher than or equal to the given value. Value must be a valid long value.
	PriorityHigherThanOrEquals string `url:"priorityHigherThanOrEquals,omitempty"`
	// PriorityLowerThanOrEquals Only include jobs with a priority lower than or equal to the given value. Value must be a valid long value.
	PriorityLowerThanOrEquals string `url:"priorityLowerThanOrEquals,omitempty"`
	// Suspended Only include suspended tasks. Value may only be true, as false matches any external task.
	Suspended string `url:"suspended,omitempty"`
	// SortBy Sort the results lexicographically by a given criterion. Valid values are id, lockExpirationTime, processInstanceId, processDefinitionId, processDefinitionKey, tenantId and taskPriority. Must be used in conjunction with the sortOrder parameter.
	SortBy string `url:"sortBy,omitempty"`
	// SortOrder Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter.
	SortOrder string `url:"sortOrder,omitempty"`
	// FirstResult Pagination of results. Specifies the index of the first result to return.
	FirstResult string `url:"firstResult,omitempty"`
	// MaxResults Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.
	MaxResults string `url:"maxResults,omitempty"`
}

TaskFilter is a filter array for filtering tasks tasks. The values will be marshalled into a query string More information at: https://docs.camunda.org/manual/7.14/reference/rest/task/get-query/

type TaskManager

type TaskManager struct {
	// contains filtered or unexported fields
}

TaskManager a client for ExternalTask API

func (*TaskManager) Complete

func (e *TaskManager) Complete(id string, query QueryComplete) error

Complete a completes an external task by id and updates process variables

func (*TaskManager) ExtendLock

func (e *TaskManager) ExtendLock(id string, query QueryExtendLock) error

ExtendLock a extends the timeout of the lock by a given amount of time

func (*TaskManager) FetchAndLock

func (e *TaskManager) FetchAndLock(req FetchAndLockRequest) ([]*ResLockedExternalTask, error)

FetchAndLock fetches and locks a specific number of external tasks for execution by a worker. Query can be restricted to specific task topics and for each task topic an individual lock time can be provided

func (*TaskManager) Get

func (e *TaskManager) Get(id string) (*ResExternalTask, error)

Get retrieves an external task by id, corresponding to the TaskManager interface in the engine

func (*TaskManager) GetList

func (e *TaskManager) GetList(filter *TaskFilter) ([]*ResExternalTask, error)

GetList queries for the external tasks that fulfill given parameters. Parameters may be static as well as dynamic runtime properties of executions Query parameters described in the documentation: https://docs.camunda.org/manual/latest/reference/rest/external-task/get-query/#query-parameters

func (*TaskManager) GetListCount

func (e *TaskManager) GetListCount(query map[string]string) (int, error)

GetListCount queries for the number of external tasks that fulfill given parameters. Takes the same parameters as the Get External Tasks method. Query parameters described in the documentation: https://docs.camunda.org/manual/latest/reference/rest/external-task/get-query-count/#query-parameters

func (*TaskManager) GetListPost

func (e *TaskManager) GetListPost(query QueryGetListPost, firstResult, maxResults int) ([]*ResExternalTask, error)

GetListPost queries for external tasks that fulfill given parameters in the form of a JSON object. This method is slightly more powerful than the Get External Tasks method because it allows to specify a hierarchical result sorting.

func (*TaskManager) GetListPostCount

func (e *TaskManager) GetListPostCount(query QueryGetListPost) (int, error)

GetListPostCount queries for the number of external tasks that fulfill given parameters. This method takes the same message body as the Get External Tasks (POST) method

func (*TaskManager) HandleBPMNError

func (e *TaskManager) HandleBPMNError(id string, query QueryHandleBPMNError) error

HandleBPMNError reports a business error in the context of a running external task by id. The error code must be specified to identify the BPMN error handler

func (*TaskManager) SetPriority

func (e *TaskManager) SetPriority(id string, priority int) error

SetPriority a sets the priority of an existing external task by id. The default value of a priority is 0

func (*TaskManager) SetRetries

func (e *TaskManager) SetRetries(id string, retries int) error

SetRetries a sets the number of retries left to execute an external task by id. If retries are set to 0, an incident is created

func (*TaskManager) SetRetriesAsync

func (e *TaskManager) SetRetriesAsync(id string, query QuerySetRetriesAsync) (*ResBatch, error)

SetRetriesAsync a set Retries For Multiple External Tasks Async (Batch). Sets the number of retries left to execute external tasks by id asynchronously. If retries are set to 0, an incident is created

func (*TaskManager) SetRetriesSync

func (e *TaskManager) SetRetriesSync(id string, query QuerySetRetriesSync) error

SetRetriesSync a set Retries For Multiple External Tasks Sync. Sets the number of retries left to execute external tasks by id synchronously. If retries are set to 0, an incident is created

func (*TaskManager) TaskFailed

func (e *TaskManager) TaskFailed(id string, query Failure) error

Failure reports a failure to execute an external task by id. A number of retries and a timeout until the task can be retried can be specified. If retries are set to 0, an incident for this task is created

func (*TaskManager) Unlock

func (e *TaskManager) Unlock(id string) error

Unlock a unlocks an external task by id. Clears the task’s lock expiration time and worker id

type Time

type Time struct {
	time.Time
}

Time a custom time format

func (*Time) MarshalJSON

func (t *Time) MarshalJSON() ([]byte, error)

MarshalJSON

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON

type TopicLockConfig

type TopicLockConfig struct {
	// Mandatory. The topic's name
	TopicName string `json:"topicName"`
	// Mandatory. The duration to lock the external tasks for in milliseconds
	LockDuration int `json:"lockDuration"`
	// A JSON array of String values that represent variable names. For each result task belonging to this topic,
	// the given variables are returned as well if they are accessible from the external task's execution.
	// If not provided - all variables will be fetched
	Variables []string `json:"variables,omitempty"`
	// If true only local variables will be fetched
	LocalVariables *bool `json:"localVariables,omitempty"`
	// A String value which enables the filtering of tasks based on process instance business key
	BusinessKey string `json:"businessKey,omitempty"`
	// Filter tasks based on process definition id
	ProcessDefinitionID string `json:"processDefinitionId,omitempty"`
	// Filter tasks based on process definition ids
	ProcessDefinitionIDIn string `json:"processDefinitionIdIn,omitempty"`
	// Filter tasks based on process definition key
	ProcessDefinitionKey string `json:"processDefinitionKey,omitempty"`
	// Filter tasks based on process definition keys
	ProcessDefinitionKeyIn *string `json:"processDefinitionKeyIn,omitempty"`
	// 	Filter tasks without tenant id
	WithoutTenantID *bool `json:"withoutTenantId,omitempty"`
	// Filter tasks based on tenant ids
	TenantIDIn []string `json:"tenantIdIn,omitempty"`
	// A JSON object used for filtering tasks based on process instance variable values.
	// A property name of the object represents a process variable name, while the property value
	// represents the process variable value to filter tasks by
	ProcessVariables map[string]*Variable `json:"processVariables,omitempty"`
	// Determines whether serializable variable values (typically variables that store custom Java objects)
	// should be deserialized on server side (default false).
	// If set to true, a serializable variable will be deserialized on server side and transformed to JSON
	// using Jackson's POJO/bean property introspection feature. Note that this requires the Java classes
	// of the variable value to be on the REST API's classpath.
	// If set to false, a serializable variable will be returned in its serialized format.
	// For example, a variable that is serialized as XML will be returned as a JSON string containing XML
	DeserializeValues *bool `json:"deserializeValues,omitempty"`
}

TopicLockConfig a JSON array of topic objects for which external tasks should be fetched

type UserTask

type UserTask struct {
	*UserTaskResponse
	// contains filtered or unexported fields
}

UserTask camunda user task

func (*UserTask) Complete

func (t *UserTask) Complete(query QueryUserTaskComplete) error

Complete complete user task

type UserTaskGetListQuery

type UserTaskGetListQuery struct {
	// Restrict to tasks that belong to process instances with the given id.
	ProcessInstanceID string `json:"processInstanceId,omitempty"`
	// Restrict to tasks that belong to process instances with the given business key.
	ProcessInstanceBusinessKey string `json:"processInstanceBusinessKey,omitempty"`
	// Restrict to tasks that belong to process instances with one of the give business keys. The keys need to be in a comma-separated list.
	ProcessInstanceBusinessKeyIn []string `json:"processInstanceBusinessKeyIn,omitempty"`
	// Restrict to tasks that have a process instance business key that has the parameter value as a substring.
	ProcessInstanceBusinessKeyLike string `json:"processInstanceBusinessKeyLike,omitempty"`
	// Restrict to tasks that belong to a process definition with the given id.
	ProcessDefinitionID string `json:"processDefinitionId,omitempty"`
	// Restrict to tasks that belong to a process definition with the given key.
	ProcessDefinitionKey string `json:"processDefinitionKey,omitempty"`
	// Restrict to tasks that belong to a process definition with one of the given keys. The keys need to be in a comma-separated list.
	ProcessDefinitionKeyIn []string `json:"processDefinitionKeyIn,omitempty"`
	// Restrict to tasks that belong to a process definition with the given name.
	ProcessDefinitionName string `json:"processDefinitionName,omitempty"`
	// Restrict to tasks that have a process definition name that has the parameter value as a substring.
	ProcessDefinitionNameLike string `json:"processDefinitionNameLike,omitempty"`
	// Restrict to tasks that belong to an execution with the given id.
	ExecutionID string `json:"executionId,omitempty"`
	// Restrict to tasks that belong to case instances with the given id.
	CaseInstanceID string `json:"caseInstanceId,omitempty"`
	// Restrict to tasks that belong to case instances with the given business key.
	CaseInstanceBusinessKey string `json:"caseInstanceBusinessKey,omitempty"`
	// Restrict to tasks that have a case instance business key that has the parameter value as a substring.
	CaseInstanceBusinessKeyLike string `json:"caseInstanceBusinessKeyLike,omitempty"`
	// Restrict to tasks that belong to a case definition with the given id.
	CaseDefinitionID string `json:"caseDefinitionId,omitempty"`
	// Restrict to tasks that belong to a case definition with the given key.
	CaseDefinitionKey string `json:"caseDefinitionKey,omitempty"`
	// Restrict to tasks that belong to a case definition with the given name.
	CaseDefinitionName string `json:"caseDefinitionName,omitempty"`
	// Restrict to tasks that have a case definition name that has the parameter value as a substring.
	CaseDefinitionNameLike string `json:"caseDefinitionNameLike,omitempty"`
	// Restrict to tasks that belong to a case execution with the given id.
	CaseExecutionID string `json:"caseExecutionId,omitempty"`
	// Only include tasks which belong to one of the passed and comma-separated activity instance ids.
	ActivityInstanceIDIn []string `json:"activityInstanceIdIn,omitempty"`
	// Only include tasks which belong to one of the passed and comma-separated tenant ids.
	TenantIDIn []string `json:"tenantIdIn,omitempty"`
	// Only include tasks which belong to no tenant. Value may only be true, as false is the default behavior.
	WithoutTenantID string `json:"withoutTenantId,omitempty"`
	// Restrict to tasks that the given user is assigned to.
	Assignee string `json:"assignee,omitempty"`
	// Restrict to tasks that the user described by the given expression is assigned to. See the user guide for more information on available functions.
	AssigneeExpression string `json:"assigneeExpression,omitempty"`
	// Restrict to tasks that have an assignee that has the parameter value as a substring.
	AssigneeLike string `json:"assigneeLike,omitempty"`
	// Restrict to tasks that have an assignee that has the parameter value described by the given expression as a substring. See the user guide for more information on available functions.
	AssigneeLikeExpression string `json:"assigneeLikeExpression,omitempty"`
	// Restrict to tasks that the given user owns.
	Owner string `json:"owner,omitempty"`
	// Restrict to tasks that the user described by the given expression owns. See the user guide for more information on available functions.
	OwnerExpression string `json:"ownerExpression,omitempty"`
	// Only include tasks that are offered to the given group.
	CandidateGroup string `json:"candidateGroup,omitempty"`
	// Only include tasks that are offered to the group described by the given expression. See the user guide for more information on available functions.
	CandidateGroupExpression string `json:"candidateGroupExpression,omitempty"`
	// Only include tasks that are offered to the given user or to one of his groups.
	CandidateUser string `json:"candidateUser,omitempty"`
	// Only include tasks that are offered to the user described by the given expression. See the user guide for more information on available functions.
	CandidateUserExpression string `json:"candidateUserExpression,omitempty"`
	// Also include tasks that are assigned to users in candidate queries. Default is to only include tasks that are not assigned to any user if you query by candidate user or group(s).
	IncludeAssignedTasks bool `json:"includeAssignedTasks,omitempty"`
	// Only include tasks that the given user is involved in. A user is involved in a task if an identity link exists between task and user (e.g., the user is the assignee).
	InvolvedUser string `json:"involvedUser,omitempty"`
	// Only include tasks that the user described by the given expression is involved in. A user is involved in a task if an identity link exists between task and user (e.g., the user is the assignee). See the user guide for more information on available functions.
	InvolvedUserExpression string `json:"involvedUserExpression,omitempty"`
	// If set to true, restricts the query to all tasks that are assigned.
	Assigned bool `json:"assigned,omitempty"`
	// If set to true, restricts the query to all tasks that are unassigned.
	Unassigned bool `json:"unassigned,omitempty"`
	// Restrict to tasks that have the given key.
	TaskDefinitionKey string `json:"taskDefinitionKey,omitempty"`
	// Restrict to tasks that have one of the given keys. The keys need to be in a comma-separated list.
	TaskDefinitionKeyIn []string `json:"taskDefinitionKeyIn,omitempty"`
	// Restrict to tasks that have a key that has the parameter value as a substring.
	TaskDefinitionKeyLike string `json:"taskDefinitionKeyLike,omitempty"`
	// Restrict to tasks that have the given name.
	Name string `json:"name,omitempty"`
	// Restrict to tasks that do not have the given name.
	NameNotEqual string `json:"nameNotEqual,omitempty"`
	// Restrict to tasks that have a name with the given parameter value as substring.
	NameLike string `json:"nameLike,omitempty"`
	// Restrict to tasks that do not have a name with the given parameter value as substring.
	NameNotLike string `json:"nameNotLike,omitempty"`
	// Restrict to tasks that have the given description.
	Description string `json:"description,omitempty"`
	// Restrict to tasks that have a description that has the parameter value as a substring.
	DescriptionLike string `json:"descriptionLike,omitempty"`
	// Restrict to tasks that have the given priority.
	Priority int64 `json:"priority,omitempty"`
	// Restrict to tasks that have a lower or equal priority.
	MaxPriority int64 `json:"maxPriority,omitempty"`
	// Restrict to tasks that have a higher or equal priority.
	MinPriority int64 `json:"minPriority,omitempty"`
	// Restrict to tasks that are due on the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2013-01-23T14:42:45.
	DueDate time.Time `json:"dueDate"`
	// Restrict to tasks that are due on the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.
	DueDateExpression time.Time `json:"dueDateExpression,omitempty"`
	// Restrict to tasks that are due after the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2013-01-23T14:42:45.
	DueAfter time.Time `json:"dueAfter,omitempty"`
	// Restrict to tasks that are due after the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.
	DueAfterExpression string `json:"dueAfterExpression,omitempty"`
	// Restrict to tasks that are due before the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2013-01-23T14:42:45.
	DueBefore time.Time `json:"dueBefore,omitempty"`
	// Restrict to tasks that are due before the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.
	DueBeforeExpression string `json:"dueBeforeExpression,omitempty"`
	// Restrict to tasks that have a followUp date on the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2013-01-23T14:42:45.
	FollowUpDate time.Time `json:"followUpDate,omitempty"`
	// Restrict to tasks that have a followUp date on the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.
	FollowUpDateExpression string `json:"followUpDateExpression,omitempty"`
	// Restrict to tasks that have a followUp date after the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2013-01-23T14:42:45.
	FollowUpAfter time.Time `json:"followUpAfter,omitempty"`
	// Restrict to tasks that have a followUp date after the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.
	FollowUpAfterExpression string `json:"followUpAfterExpression,omitempty"`
	// Restrict to tasks that have a followUp date before the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2013-01-23T14:42:45.
	FollowUpBefore time.Time `json:"followUpBefore,omitempty"`
	// Restrict to tasks that have a followUp date before the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.
	FollowUpBeforeExpression string `json:"followUpBeforeExpression,omitempty"`
	// Restrict to tasks that have no followUp date or a followUp date before the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2013-01-23T14:42:45. The typical use case is to query all "active" tasks for a user for a given date.
	FollowUpBeforeOrNotExistent time.Time `json:"followUpBeforeOrNotExistent,omitempty"`
	// Restrict to tasks that have no followUp date or a followUp date before the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.
	FollowUpBeforeOrNotExistentExpression string `json:"followUpBeforeOrNotExistentExpression,omitempty"`
	// Restrict to tasks that were created on the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2013-01-23T14:42:45. Note: if the used database saves dates with milliseconds precision this query only will return tasks created on the given timestamp with zero milliseconds.
	CreatedOn time.Time `json:"createdOn,omitempty"`
	// Restrict to tasks that were created on the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.
	CreatedOnExpression string `json:"createdOnExpression,omitempty"`
	// Restrict to tasks that were created after the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2013-01-23T14:42:45.
	CreatedAfter time.Time `json:"createdAfter,omitempty"`
	// Restrict to tasks that were created after the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.
	CreatedAfterExpression string `json:"createdAfterExpression,omitempty"`
	// Restrict to tasks that were created before the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2013-01-23T14:42:45.
	CreatedBefore time.Time `json:"createdBefore,omitempty"`
	// Restrict to tasks that were created before the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.
	CreatedBeforeExpression string `json:"createdBeforeExpression,omitempty"`
	// Restrict to tasks that are in the given delegation state. Valid values are PENDING and RESOLVED.
	DelegationState delegationState `json:"delegationState,omitempty"`
	// Restrict to tasks that are offered to any of the given candidate groups.Takes a comma-separated list of group names, so for example developers, support, sales.
	CandidateGroups []string `json:"candidateGroups,omitempty"`
	// Restrict to tasks that are offered to any of the candidate groups described by the given expression.See the user guide for more information on available functions.The expression must evaluate to java.util.List of Strings.
	CandidateGroupsExpression []string `json:"candidateGroupsExpression,omitempty"`
	// Only include tasks which have a candidate group.Value may only be true, as false is the default behavior.
	WithCandidateGroups bool `json:"withCandidateGroups,omitempty"`
	// Only include tasks which have no candidate group.Value may only be true, as false is the default behavior.
	WithoutCandidateGroups bool `json:"withoutCandidateGroups,omitempty"`
	// Only include tasks which have a candidate user.Value may only be true, as false is the default behavior.
	WithCandidateUsers bool `json:"withCandidateUsers,omitempty"`
	// Only include tasks which have no candidate users.Value may only be true, as false is the default behavior.
	WithoutCandidateUsers bool `json:"withoutCandidateUsers,omitempty"`
	// Only include active tasks.Value may only be true, as false is the default behavior.
	Active bool `json:"active,omitempty"`
	// Only include suspended tasks.Value may only be true, as false is the default behavior.
	Suspended bool `json:"suspended,omitempty"`
	// Only include tasks that have variables with certain values.Variable filtering expressions are comma-separated and are structured as follows:
	// A valid parameter value has the form key_operator_value.key is the variable name, operator is the comparison operator to be used and value the variable value.
	// Note: Values are always treated as String objects on server side.
	//
	// Valid operator values are: eq - equal to;
	// neq - not equal to;
	// gt - greater than;
	// gteq - greater than or equal to;
	// lt - lower than;
	// lteq - lower than or equal to;
	// like.
	// key and value may not contain underscore or comma characters.
	TaskVariables []VariableFilterExpression `json:"taskVariables,omitempty"`
	// Only include tasks that belong to process instances that have variables with certain values.Variable filtering expressions are comma-separated and are structured as follows:
	// A valid parameter value has the form key_operator_value.key is the variable name, operator is the comparison operator to be used and value the variable value.
	// Note: Values are always treated as String objects on server side.
	//
	// Valid operator values are: eq - equal to;
	// neq - not equal to;
	// gt - greater than;
	// gteq - greater than or equal to;
	// lt - lower than;
	// lteq - lower than or equal to;
	// like.
	// key and value may not contain underscore or comma characters.
	ProcessVariables []VariableFilterExpression `json:"processVariables,omitempty"`
	// Only include tasks that belong to case instances that have variables with certain values.Variable filtering expressions are comma-separated and are structured as follows:
	// A valid parameter value has the form key_operator_value.key is the variable name, operator is the comparison operator to be used and value the variable value.
	// Note: Values are always treated as String objects on server side.
	//
	// Valid operator values are: eq - equal to;
	// neq - not equal to;
	// gt - greater than;
	// gteq - greater than or equal to;
	// lt - lower than;
	// lteq - lower than or equal to;
	// like.
	// key and value may not contain underscore or comma characters.
	CaseInstanceVariables []VariableFilterExpression `json:"caseInstanceVariables,omitempty"`
	// Restrict query to all tasks that are sub tasks of the given task.Takes a task id.
	ParentTaskID string `json:"parentTaskId,omitempty"`
	// Sort the results lexicographically by a given criterion.Valid values are instanceId, caseInstanceId, dueDate, executionId, caseExecutionId, assignee, created, description, id, name, nameCaseInsensitive and priority.Must be used in conjunction with the sortOrder parameter.
	SortBy string `json:"sortBy,omitempty"`
	// Sort the results in a given order.Values may be asc for ascending order or desc for descending order.Must be used in conjunction with the sortBy parameter.
	SortOrder string `json:"sortOrder,omitempty"`
	// Pagination of results.Specifies the index of the first result to return.
	FirstResult int64 `json:"firstResult,omitempty"`
	// Pagination of results.Specifies the maximum number of results to return.Will return less results if there are no more results left.
	MaxResults int64 `json:"maxResults,omitempty"`
}

UserTaskGetListQuery query for GetList,

func (*UserTaskGetListQuery) MarshalJSON

func (q *UserTaskGetListQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal to json

type UserTaskResponse

type UserTaskResponse struct {
	// The id of the task.
	ID string `json:"id"`
	// The tasks name.
	Name string `json:"name"`
	// The user assigned to this task.
	Assignee string `json:"assignee"`
	// The time the task was created.Format yyyy-MM-dd'T'HH:mm:ss.
	Created string `json:"created"`
	// The due date for the task.Format yyyy-MM-dd'T'HH:mm:ss.
	Due string `json:"due"`
	// The follow-up date for the task.Format yyyy-MM-dd'T'HH:mm:ss.
	FollowUp string `json:"followUp"`
	// The delegation state of the task.Corresponds to the DelegationState enum in the engine.Possible values are RESOLVED and PENDING.
	DelegationState string `json:"delegationState"`
	// The task description.
	Description string `json:"description"`
	// The id of the execution the task belongs to.
	ExecutionID string `json:"executionId"`
	// The owner of the task.
	Owner string `json:"owner"`
	// The id of the parent task, if this task is a subtask.
	ParentTaskID string `json:"parentTaskId"`
	// The priority of the task.
	Priority int64 `json:"priority"`
	// The id of the process definition this task belongs to.
	ProcessDefinitionID string `json:"processDefinitionId"`
	// The id of the process instance this task belongs to.
	ProcessInstanceID string `json:"processInstanceId"`
	// The id of the case execution the task belongs to.
	CaseExecutionID string `json:"caseExecutionId"`
	// The id of the case definition the task belongs to.
	CaseDefinitionID string `json:"caseDefinitionId"`
	// The id of the case instance the task belongs to.
	CaseInstanceID string `json:"caseInstanceId"`
	// The task definition key.
	TaskDefinitionKey string `json:"taskDefinitionKey"`
	// Whether the task belongs to a process instance that is suspended.
	Suspended bool `json:"suspended"`
	// If not null, the form key for the task.
	FormKey *string `json:"formKey"`
	// If not null, the tenantId for the task.
	TenantID *string `json:"tenantId"`
}

UserTaskResponse Get task response

type ValueInfo

type ValueInfo struct {
	// A string representation of the object's type name
	ObjectTypeName string `json:"objectTypeName,omitempty"`
	// The serialization format used to store the variable.
	SerializationDataFormat string `json:"serializationDataFormat,omitempty"`
}

ValueInfo a value info in variable

type Variable

type Variable struct {
	// The variable's value
	Value interface{} `json:"value"`
	// The value type of the variable.
	Type string `json:"type"`
	// A JSON object containing additional, value-type-dependent properties
	ValueInfo *ValueInfo `json:"valueInfo,omitempty"`
}

Variable a variable

type VariableFilterExpression

type VariableFilterExpression struct {
	Name     string                           `json:"name"`
	Operator variableFilterExpressionOperator `json:"operator"`
	Value    string                           `json:"value"`
}

VariableFilterExpression filter expression

type VariableSet

type VariableSet struct {
	// The variable's value
	Value string `json:"value"`
	// The value type of the variable.
	Type string `json:"type"`
	// A JSON object containing additional, value-type-dependent properties
	ValueInfo ValueInfo `json:"valueInfo"`
	// Indicates whether the variable should be a local variable or not. If set to true, the variable becomes a local
	// variable of the execution entering the target activity
	Local bool `json:"local"`
}

VariableSet a variable for set

type Variables

type Variables map[string]*Variable

func CreateVariables

func CreateVariables(v map[string]interface{}) Variables

func (Variables) AddJSON

func (v Variables) AddJSON(key string, val interface{})

func (Variables) AddJSONBytes

func (v Variables) AddJSONBytes(key string, bb []byte)

func (Variables) AddList

func (v Variables) AddList(key string, values interface{})

func (Variables) AddObject

func (v Variables) AddObject(key string, value interface{})

func (Variables) AddString

func (v Variables) AddString(key string, value string)

func (Variables) Int

func (v Variables) Int(name string) (int, error)

func (Variables) JSON

func (v Variables) JSON(name string) ([]byte, error)

func (Variables) Map

func (v Variables) Map() map[string]interface{}

Map mapping values to original map format without type definitions and valueInfo fields

func (Variables) MarshalField

func (v Variables) MarshalField(name string, field interface{}) error

MarshalField marshals a field to the destination interface

func (Variables) String

func (v Variables) String(name string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL