ControlActivity Class

public class ControlActivity
extends Activity

Base class for all control activities like IfCondition, ForEach , Until.

Constructor Summary

Constructor Description
ControlActivity()

Creates an instance of ControlActivity class.

Method Summary

Modifier and Type Method and Description
static ControlActivity fromJson(JsonReader jsonReader)

Reads an instance of ControlActivity from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: Type of activity.

void validate()

Validates the instance.

ControlActivity withDependsOn(List<ActivityDependency> dependsOn)

Set the dependsOn property: Activity depends on condition.

ControlActivity withDescription(String description)

Set the description property: Activity description.

ControlActivity withName(String name)

Set the name property: Activity name.

ControlActivity withOnInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs)

Set the onInactiveMarkAs property: Status result of the activity when the state is set to Inactive.

ControlActivity withState(ActivityState state)

Set the state property: Activity state.

ControlActivity withUserProperties(List<UserProperty> userProperties)

Set the userProperties property: Activity user properties.

Methods inherited from Activity

Methods inherited from java.lang.Object

Constructor Details

ControlActivity

public ControlActivity()

Creates an instance of ControlActivity class.

Method Details

fromJson

public static ControlActivity fromJson(JsonReader jsonReader)

Reads an instance of ControlActivity from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ControlActivity if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

ControlActivity.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: Type of activity.

Overrides:

ControlActivity.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

Overrides:

ControlActivity.validate()

withDependsOn

public ControlActivity withDependsOn(List<ActivityDependency> dependsOn)

Set the dependsOn property: Activity depends on condition.

Overrides:

ControlActivity.withDependsOn(List<ActivityDependency> dependsOn)

Parameters:

dependsOn

withDescription

public ControlActivity withDescription(String description)

Set the description property: Activity description.

Overrides:

ControlActivity.withDescription(String description)

Parameters:

description

withName

public ControlActivity withName(String name)

Set the name property: Activity name.

Overrides:

ControlActivity.withName(String name)

Parameters:

name

withOnInactiveMarkAs

public ControlActivity withOnInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs)

Set the onInactiveMarkAs property: Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default.

Overrides:

ControlActivity.withOnInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs)

Parameters:

onInactiveMarkAs

withState

public ControlActivity withState(ActivityState state)

Set the state property: Activity state. This is an optional property and if not provided, the state will be Active by default.

Overrides:

ControlActivity.withState(ActivityState state)

Parameters:

state

withUserProperties

public ControlActivity withUserProperties(List<UserProperty> userProperties)

Set the userProperties property: Activity user properties.

Overrides:

ControlActivity.withUserProperties(List<UserProperty> userProperties)

Parameters:

userProperties

Applies to