Package com.redhat.parodos.tasks.jira
Class JiraTask
java.lang.Object
com.redhat.parodos.workflow.task.BaseWorkFlowTask
com.redhat.parodos.tasks.jira.JiraTask
- All Implemented Interfaces:
WorkFlowTask,com.redhat.parodos.workflows.work.Work,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
JiraTask can create/retrieve/update/delete a jira task depending on the fields passed
in the context of the execution. #excute returns an extended work report containing a
jira issue, and/or the api respond Any 2xx return code is COMPLETED, and anything else
is FAILED
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected com.redhat.parodos.tasks.jira.JiraTask.JiraIssueClientFields inherited from class com.redhat.parodos.workflow.task.BaseWorkFlowTask
taskLogger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.redhat.parodos.workflows.work.WorkReportexecute(com.redhat.parodos.workflows.work.WorkContext workContext) @NonNull List<WorkParameter>Methods inherited from class com.redhat.parodos.workflow.task.BaseWorkFlowTask
addAdditionInfo, addParameter, getAllParameters, getMainExecutionId, getName, getOptionalParameterValue, getOptionalParameterValue, getProjectId, getRequiredParameterValue, getWorkFlowCheckers, preExecute, setBeanName, setWorkFlowCheckersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.redhat.parodos.workflow.task.WorkFlowTask
getAsJsonSchema, getWorkFlowTaskOutputs
-
Field Details
-
jiraClient
protected com.redhat.parodos.tasks.jira.JiraTask.JiraIssueClient jiraClient -
DEFAULT_EXECUTION_TIMEOUT_IN_SECONDS
public static final int DEFAULT_EXECUTION_TIMEOUT_IN_SECONDS- See Also:
-
-
Constructor Details
-
JiraTask
public JiraTask()
-
-
Method Details
-
getWorkFlowTaskParameters
-
execute
public com.redhat.parodos.workflows.work.WorkReport execute(com.redhat.parodos.workflows.work.WorkContext workContext) - Parameters:
workContext- optional context values: serverURL, and bearerToken for the Jira's client auth. Other optional context values and how they affect execution: Create: id: do not exist in the context map title: value of title comments: [ list of comments to add ] Retrieve: id: valid ticket id all title, status, comments do not exist in the map Update: id: valid ticket id status: new ticket status (allows closing) title: new title comments: new comment to add If none of the context params passed then this execution is invalid and returns a failure.- Returns:
-