Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Task *camunda_client_go.ResLockedExternalTask // contains filtered or unexported fields }
Context external task context
func (*Context) Complete ¶
func (c *Context) Complete(query QueryComplete) error
Complete a mark external task is complete
func (*Context) HandleBPMNError ¶
func (c *Context) HandleBPMNError(query QueryHandleBPMNError) error
HandleBPMNError handle external task BPMN error
func (*Context) HandleFailure ¶
func (c *Context) HandleFailure(query QueryHandleFailure) error
HandleFailure handle external task failure
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor external task processor
func NewProcessor ¶
func NewProcessor(client *camunda_client_go.Client, options *ProcessorOptions, logger func(err error)) *Processor
NewProcessor a create new instance Processor
func (*Processor) AddHandler ¶
func (p *Processor) AddHandler(topics *[]camunda_client_go.QueryFetchAndLockTopic, handler Handler)
AddHandler a add handler for external task
type ProcessorOptions ¶
type ProcessorOptions struct { // workerId for all request (default: `worker-{random_int}`) WorkerId string // lock duration for all external task LockDuration time.Duration // maximum tasks to receive for 1 request to camunda MaxTasks int // maximum running parallel task per handler MaxParallelTaskPerHandler int // use priority UsePriority *bool // long polling timeout // // Deprecated: Use LongPollingTimeout instead AsyncResponseTimeout *int // long polling timeout LongPollingTimeout time.Duration }
ProcessorOptions options for Processor
type QueryComplete ¶
type QueryComplete struct { // A JSON object containing variable key-value pairs Variables *map[string]camunda_client_go.Variable `json:"variables"` // A JSON object containing variable key-value pairs. // Local variables are set only in the scope of external task LocalVariables *map[string]camunda_client_go.Variable `json:"localVariables"` }
QueryComplete a query for Complete request
type QueryHandleBPMNError ¶
type QueryHandleBPMNError struct { // An error code that indicates the predefined error. Is used to identify the BPMN error handler ErrorCode *string `json:"errorCode,omitempty"` // An error message that describes the error ErrorMessage *string `json:"errorMessage,omitempty"` // 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 *map[string]camunda_client_go.Variable `json:"variables"` }
QueryHandleBPMNError a query for HandleBPMNError request
type QueryHandleFailure ¶
type QueryHandleFailure struct { // 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"` }
QueryHandleFailure a query for HandleFailure request
Click to show internal directories.
Click to hide internal directories.