Class to handle creation of zOSMF workflow instance

### Hierarchy

- CreateWorkflow

## Index

### Methods

- createWorkflow
- createWorkflowLocal
- deleteTempFile
- getTempFile
- parseProperties
- uploadTempFile

## Methods

### Static createWorkflow

- createWorkflow(session: AbstractSession, WorkflowName: string, WorkflowDefinitionFile: string, systemName: string, Owner: string, VariableInputFile?: string, Variables?: string, AssignToOwner?: boolean, AccessType?: accessT, DeleteCompletedJobs?: boolean, zOSMFVersion?: string): Promise<ICreatedWorkflow>

- - Defined in @zowe/zos-workflows-for-zowe-sdk/src/Create.ts:71

  Create a zOSMF workflow instance

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### WorkflowName: string

    Name of the workflow that will be created

  - ##### WorkflowDefinitionFile: string

    Full path to USS file or DATASET/MEMBER with xml

  - ##### systemName: string

    System where the workflow will run

  - ##### Owner: string

    User ID of the workflow owner.

  - ##### Optional VariableInputFile: string

    Properties file with pre-specify values for workflow variables

  - ##### Optional Variables: string

    A list of one or more variables for the workflow.

  - ##### Optional AssignToOwner: boolean

    Indicates whether the workflow steps are assigned to the workflow owner

  - ##### Optional AccessType: accessT

    Specifies the access type for the workflow. Public, Restricted or Private.

  - ##### Optional DeleteCompletedJobs: boolean

    Specifies whether the job is deleted from the JES spool after it completes successfully.

  - ##### Default value zOSMFVersion: string = WorkflowConstants.ZOSMF_VERSION

    Identifies the version of the zOSMF workflow service.

  #### Returns Promise<ICreatedWorkflow>

### Static createWorkflowLocal

- createWorkflowLocal(session: AbstractSession, WorkflowName: string, WorkflowDefinitionFile: string, systemName: string, Owner: string, VariableInputFile?: string, Variables?: string, AssignToOwner?: boolean, AccessType?: accessT, DeleteCompletedJobs?: boolean, keepFiles?: boolean, customDir?: string, zOSMFVersion?: string): Promise<ICreatedWorkflowLocal>

- - Defined in @zowe/zos-workflows-for-zowe-sdk/src/Create.ts:138

  Create a zOSMF workflow instance using local files

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### WorkflowName: string

    Name of the workflow that will be created

  - ##### WorkflowDefinitionFile: string

    Local workflow definition file

  - ##### systemName: string

    System where the workflow will run

  - ##### Owner: string

    User ID of the workflow owner.

  - ##### Optional VariableInputFile: string

    Local properties file with pre-specify values for workflow variables

  - ##### Optional Variables: string

    A list of one or more variables for the workflow.

  - ##### Optional AssignToOwner: boolean

    Indicates whether the workflow steps are assigned to the workflow owner

  - ##### Optional AccessType: accessT

    Specifies the access type for the workflow. Public, Restricted or Private.

  - ##### Optional DeleteCompletedJobs: boolean

    Specifies whether the job is deleted from the JES spool after it completes successfully.

  - ##### Optional keepFiles: boolean

    Identifies if the uploaded uss files should be kept.

  - ##### Optional customDir: string

    Path to specific USS directory in which to upload the temp files.

  - ##### Default value zOSMFVersion: string = WorkflowConstants.ZOSMF_VERSION

    Identifies the version of the zOSMF workflow service.

  #### Returns Promise<ICreatedWorkflowLocal>

### Static deleteTempFile

- deleteTempFile(session: AbstractSession, ussFileName: string): Promise<string>

- - Defined in @zowe/zos-workflows-for-zowe-sdk/src/Create.ts:222

  Delete USS file

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info.

  - ##### ussFileName: string

    USS file to delete.

  #### Returns Promise<string>

### Static getTempFile

- getTempFile(userId: string, localFile: string, customDir?: string): string

- - Defined in @zowe/zos-workflows-for-zowe-sdk/src/Create.ts:190

  Get a full path with file name for a temporary USS file

  #### Parameters

  - ##### userId: string

    User ID to add to the file name.

  - ##### localFile: string

    Local file name.

  - ##### Optional customDir: string

    Custom directory.

  #### Returns string

### Static parseProperties

- parseProperties(propertiesText: string): IVariable[]

- - Defined in @zowe/zos-workflows-for-zowe-sdk/src/Create.ts:43

  copied from ProvisioningService.ts Parsers text with properties in key1=val1,key2=val2 format and returns IInputProperty[]

  memberof

    ProvisioningService

  #### Parameters

  - ##### propertiesText: string

    required runtime property objects passed as a string.

  #### Returns IVariable[]

  array of properties, @see {IPropertiesInput}

### Static uploadTempFile

- uploadTempFile(session: AbstractSession, localFile: string, remoteFile: string): Promise<void>

- - Defined in @zowe/zos-workflows-for-zowe-sdk/src/Create.ts:207

  Upload USS files to default dir, or a user specified one

  throws

    {ImperativeError} - In case something goes wrong.

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info.

  - ##### localFile: string

    Local file to upload.

  - ##### remoteFile: string

    Remote location to upload to.

  #### Returns Promise<void>

Generated using TypeDoc