Documentation
¶
Index ¶
- type ActClient
- func (c *ActClient) CreateUser(u ActUser) (*ActUser, error)
- func (c *ActClient) DeleteUser(uid string) error
- func (c *ActClient) GetProcessDefinition(pid string) (*ActProcessDefinition, error)
- func (c *ActClient) GetProcessDefinitions() (*ActProcessDefinitions, error)
- func (c *ActClient) GetProcessInstance(pid string) (*ActProcessInstance, error)
- func (c *ActClient) GetProcessInstances() (*ActProcessInstances, error)
- func (c *ActClient) GetTask(tid string) (*ActTask, error)
- func (c *ActClient) GetTasks() (*ActTasks, error)
- func (c *ActClient) GetUser(uid string) (*ActUser, error)
- func (c *ActClient) GetUsers() (*ActUsers, error)
- func (c *ActClient) NewRequest(method, url string, payload interface{}) (*http.Request, error)
- func (c *ActClient) Send(req *http.Request, v interface{}) error
- func (c *ActClient) SendWithBasicAuth(req *http.Request, v interface{}) error
- func (c *ActClient) SetHTTPClient(client *http.Client)
- func (c *ActClient) SetLog(log io.Writer)
- func (c *ActClient) StartProcessInstanceById(pid string) (*ActProcessInstance, error)
- func (c *ActClient) StartProcessInstanceByKey(key string) (*ActProcessInstance, error)
- func (c *ActClient) StartProcessInstanceByMessage(msg string) (*ActProcessInstance, error)
- func (c *ActClient) TaskAction(tid string, action TaskAction, assignee string) error
- func (c *ActClient) UpdateUser(u ActUser) (*ActUser, error)
- type ActErrorResponse
- type ActProcessDefinition
- type ActProcessDefinitions
- type ActProcessInstance
- type ActProcessInstances
- type ActStartProcessInstance
- type ActTask
- type ActTasks
- type ActUser
- type ActUsers
- type ActVariable
- type JSONTime
- type TaskAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActClient ¶
type ActClient struct { Client *http.Client Username string Password string BaseURL string Log io.Writer // If user set log file name all requests will be logged there }
Client represents a Activiti 6.x REST API Client
func NewClient ¶
NewClient returns new Client struct BaseURL is the activiti rest api url, for example 'http://localhost:8080'
func (*ActClient) CreateUser ¶
CreateUser creates a user in activiti Endpoint: POST identity/users
func (*ActClient) DeleteUser ¶
DeleteUser deletes a user in activiti Endpoint: DELETE identity/users/{userId}
func (*ActClient) GetProcessDefinition ¶
func (c *ActClient) GetProcessDefinition(pid string) (*ActProcessDefinition, error)
GetProcessDefinition retrieves process definition by ID Endpoint: GET repository/process-definitions/{processDefinitionId}
func (*ActClient) GetProcessDefinitions ¶
func (c *ActClient) GetProcessDefinitions() (*ActProcessDefinitions, error)
GetProcessDefinitions retrieves all process definitions Endpoint: GET repository/process-definitions
func (*ActClient) GetProcessInstance ¶
func (c *ActClient) GetProcessInstance(pid string) (*ActProcessInstance, error)
GetProcessInstance retrieves process instance by ID Endpoint: GET runtime/process-instances/{processInstanceId}
func (*ActClient) GetProcessInstances ¶
func (c *ActClient) GetProcessInstances() (*ActProcessInstances, error)
GetProcessInstances retrieves all process instances Endpoint: GET runtime/process-instances
func (*ActClient) NewRequest ¶
NewRequest constructs a request Convert payload to a JSON
func (*ActClient) Send ¶
Send makes a request to the API, the response body will be unmarshaled into v, or if v is an io.Writer, the response will be written to it without decoding
func (*ActClient) SendWithBasicAuth ¶
SendWithBasicAuth makes a request to the API using username:password basic auth
func (*ActClient) SetHTTPClient ¶
SetHTTPClient sets *http.Client to current client
func (*ActClient) SetLog ¶
SetLog will set/change the output destination. If log file is set all requests and responses will be logged to this Writer
func (*ActClient) StartProcessInstanceById ¶
func (c *ActClient) StartProcessInstanceById(pid string) (*ActProcessInstance, error)
Start a process instance by process definition id
func (*ActClient) StartProcessInstanceByKey ¶
func (c *ActClient) StartProcessInstanceByKey(key string) (*ActProcessInstance, error)
Start a process instance by process definition key
func (*ActClient) StartProcessInstanceByMessage ¶
func (c *ActClient) StartProcessInstanceByMessage(msg string) (*ActProcessInstance, error)
Start a process instance by process definition message
func (*ActClient) TaskAction ¶
func (c *ActClient) TaskAction(tid string, action TaskAction, assignee string) error
TaskAction complete/claim/delegate/resolve a task in activiti Endpoint: POST runtime/tasks/{taskId}
type ActErrorResponse ¶
type ActErrorResponse struct { Response *http.Response `json:"-"` // contains filtered or unexported fields }
ErrorResponse https://www.activiti.org/userguide/#_error_response_body
func (*ActErrorResponse) Error ¶
func (r *ActErrorResponse) Error() string
Error method implementation for ErrorResponse struct
type ActProcessDefinition ¶
type ActProcessDefinition struct { ID string `json:"id,omitempty"` URL string `json:"url,omitempty"` Version int `json:"version,omitempty"` Key string `json:"key,omitempty"` Category string `json:"category,omitempty"` Suspended bool `json:"suspended,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` DeploymentId string `json:"deploymentId,omitempty"` DeploymentUrl string `json:"deploymentUrl,omitempty"` GraphicalNotationDefined bool `json:"graphicalNotationDefined,omitempty"` Resource string `json:"resource,omitempty"` DiagramResource string `json:"diagramResource,omitempty"` StartFormDefined bool `json:"startFormDefined,omitempty"` }
type ActProcessDefinitions ¶
type ActProcessInstance ¶
type ActProcessInstance struct { ID string `json:"id,omitempty"` URL string `json:"url,omitempty"` BusinessKey string `json:"businessKey,omitempty"` Suspended bool `json:"suspended,omitempty"` ProcessDefinitionUrl string `json:"processDefinitionUrl,omitempty"` ActivityId string `json:"activityId,omitempty"` TenantId string `json:"tenantId,omitempty"` }
type ActProcessInstances ¶
type ActStartProcessInstance ¶
type ActStartProcessInstance struct { ProcessDefinitionId string `json:"processDefinitionId,omitempty"` ProcessDefinitionKey string `json:"processDefinitionKey,omitempty"` Message string `json:"message,omitempty"` BusinessKey string `json:"businessKey,omitempty"` TenantId string `json:"tenantId,omitempty"` Variables []ActVariable `json:"variables,omitempty"` }
type ActTask ¶
type ActTask struct { Assignee string `json:"assignee,omitempty"` CreateTime string `json:"createTime,omitempty"` DelegationState string `json:"delegationState,omitempty"` Description string `json:"description,omitempty"` DueDate string `json:"dueDate,omitempty"` Execution string `json:"execution,omitempty"` Dd string `json:"id,omitempty"` Name string `json:"name,omitempty"` Owner string `json:"owner,omitempty"` ParentTask string `json:"parentTask,omitempty"` Priority int `json:"priority,omitempty"` ProcessDefinition string `json:"processDefinition,omitempty"` ProcessInstance string `json:"processInstance,omitempty"` Suspended bool `json:"suspended,omitempty"` TaskDefinitionKey string `json:"taskDefinitionKey,omitempty"` Url string `json:"url,omitempty"` TenantId string `json:"tenantId,omitempty"` }
type ActUser ¶
type ActUser struct { ID string `json:"id,omitempty"` FirstName string `json:"firstName,omitempty"` LastName string `json:"lastName,omitempty"` Email string `json:"email,omitempty"` URL string `json:"url,omitempty"` PictureURL string `json:"pictureUrl,omitempty"` Password string `json:"password,omitempty"` }
type ActVariable ¶
type JSONTime ¶
JSONTime overrides MarshalJson method to format in ISO8601
func (JSONTime) MarshalJSON ¶
MarshalJSON for JSONTime
type TaskAction ¶
type TaskAction string
const ( TASK_ACTION_COMPLETE TaskAction = "complete" TASK_ACTION_CLAIM TaskAction = "claim" TASK_ACTION_DELEGATE TaskAction = "delegate" TASK_ACTION_RESOLVE TaskAction = "resolve" )