UntilActivity Class

public final 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
List<Activity> activities()

Get the activities property: List of activities to execute.

Expression expression()

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

static UntilActivity fromJson(JsonReader jsonReader)

Reads an instance of UntilActivity from the JsonReader.

Object timeout()

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

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: Type of activity.

void validate()

Validates the instance.

UntilActivity withActivities(List<Activity> activities)

Set the activities property: List of activities to execute.

UntilActivity withDependsOn(List<ActivityDependency> dependsOn)

Set the dependsOn property: Activity depends on condition.

UntilActivity withDescription(String description)

Set the description property: Activity description.

UntilActivity withExpression(Expression expression)

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

UntilActivity withName(String name)

Set the name property: Activity name.

UntilActivity withOnInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs)

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

UntilActivity withState(ActivityState state)

Set the state property: Activity state.

UntilActivity withTimeout(Object timeout)

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

UntilActivity withUserProperties(List<UserProperty> userProperties)

Set the userProperties property: Activity user properties.

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

activities

public List<Activity> activities()

Get the activities property: List of activities to execute.

Returns:

the activities value.

expression

public Expression expression()

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.

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.

timeout

public Object timeout()

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])).

Returns:

the timeout value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

UntilActivity.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: Type of activity.

Overrides:

UntilActivity.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

Overrides:

UntilActivity.validate()

withActivities

public UntilActivity withActivities(List<Activity> activities)

Set the activities property: List of activities to execute.

Parameters:

activities - the activities value to set.

Returns:

the UntilActivity object itself.

withDependsOn

public UntilActivity withDependsOn(List<ActivityDependency> dependsOn)

Set the dependsOn property: Activity depends on condition.

Overrides:

UntilActivity.withDependsOn(List<ActivityDependency> dependsOn)

Parameters:

dependsOn

withDescription

public UntilActivity withDescription(String description)

Set the description property: Activity description.

Overrides:

UntilActivity.withDescription(String description)

Parameters:

description

withExpression

public UntilActivity withExpression(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.

withName

public UntilActivity withName(String name)

Set the name property: Activity name.

Overrides:

UntilActivity.withName(String name)

Parameters:

name

withOnInactiveMarkAs

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

UntilActivity.withOnInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs)

Parameters:

onInactiveMarkAs

withState

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

UntilActivity.withState(ActivityState state)

Parameters:

state

withTimeout

public UntilActivity withTimeout(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])).

Parameters:

timeout - the timeout value to set.

Returns:

the UntilActivity object itself.

withUserProperties

public UntilActivity withUserProperties(List<UserProperty> userProperties)

Set the userProperties property: Activity user properties.

Overrides:

UntilActivity.withUserProperties(List<UserProperty> userProperties)

Parameters:

userProperties

Applies to