UntilActivity Class

public class UntilActivity
extends ControlActivity

This activity executes inner activities until the specified boolean expression results to true or timeout is reached, whichever is earlier.

Constructor Summary

Constructor Description
UntilActivity()

Creates an instance of UntilActivity class.

Method Summary

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

Reads an instance of UntilActivity from the JsonReader.

List<Activity> getActivities()

Get the activities property: List of activities to execute.

Expression getExpression()

Get the expression property: An expression that would evaluate to Boolean.

Object getTimeout()

Get the timeout property: Specifies the timeout for the activity to run.

String getType()

Get the type property: Type of activity.

UntilActivity setActivities(List<Activity> activities)

Set the activities property: List of activities to execute.

UntilActivity setDependsOn(List<ActivityDependency> dependsOn)

Set the dependsOn property: Activity depends on condition.

UntilActivity setDescription(String description)

Set the description property: Activity description.

UntilActivity setExpression(Expression expression)

Set the expression property: An expression that would evaluate to Boolean.

UntilActivity setName(String name)

Set the name property: Activity name.

UntilActivity setOnInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs)

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

UntilActivity setState(ActivityState state)

Set the state property: Activity state.

UntilActivity setTimeout(Object timeout)

Set the timeout property: Specifies the timeout for the activity to run.

UntilActivity setUserProperties(List<UserProperty> userProperties)

Set the userProperties property: Activity user properties.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from Activity

Methods inherited from ControlActivity

Methods inherited from java.lang.Object

Constructor Details

UntilActivity

public UntilActivity()

Creates an instance of UntilActivity class.

Method Details

fromJson

public static UntilActivity fromJson(JsonReader jsonReader)

Reads an instance of UntilActivity from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of UntilActivity 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.

getActivities

public List<Activity> getActivities()

Get the activities property: List of activities to execute.

Returns:

the activities value.

getExpression

public Expression getExpression()

Get the expression property: An expression that would evaluate to Boolean. The loop will continue until this expression evaluates to true.

Returns:

the expression value.

getTimeout

public Object getTimeout()

Get the timeout property: Specifies the timeout for the activity to run. If there is no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 week as default. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).

Returns:

the timeout value.

getType

public String getType()

Get the type property: Type of activity.

Overrides:

UntilActivity.getType()

Returns:

the type value.

setActivities

public UntilActivity setActivities(List<Activity> activities)

Set the activities property: List of activities to execute.

Parameters:

activities - the activities value to set.

Returns:

the UntilActivity object itself.

setDependsOn

public UntilActivity setDependsOn(List<ActivityDependency> dependsOn)

Set the dependsOn property: Activity depends on condition.

Overrides:

UntilActivity.setDependsOn(List<ActivityDependency> dependsOn)

Parameters:

dependsOn

setDescription

public UntilActivity setDescription(String description)

Set the description property: Activity description.

Overrides:

UntilActivity.setDescription(String description)

Parameters:

description

setExpression

public UntilActivity setExpression(Expression expression)

Set the expression property: An expression that would evaluate to Boolean. The loop will continue until this expression evaluates to true.

Parameters:

expression - the expression value to set.

Returns:

the UntilActivity object itself.

setName

public UntilActivity setName(String name)

Set the name property: Activity name.

Overrides:

UntilActivity.setName(String name)

Parameters:

name

setOnInactiveMarkAs

public UntilActivity setOnInactiveMarkAs(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:

UntilActivity.setOnInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs)

Parameters:

onInactiveMarkAs

setState

public UntilActivity setState(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:

UntilActivity.setState(ActivityState state)

Parameters:

state

setTimeout

public UntilActivity setTimeout(Object timeout)

Set the timeout property: Specifies the timeout for the activity to run. If there is no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 week as default. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).

Parameters:

timeout - the timeout value to set.

Returns:

the UntilActivity object itself.

setUserProperties

public UntilActivity setUserProperties(List<UserProperty> userProperties)

Set the userProperties property: Activity user properties.

Overrides:

UntilActivity.setUserProperties(List<UserProperty> userProperties)

Parameters:

userProperties

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

UntilActivity.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to