Skip to content

Routing Orders

Purpose

Call and list routing order.

Methods

Binding name: p6.routingorder


getActiveNames

List all the active routing order name.

Syntax

List<String> p6.routingorder.getActiveNames()
Example
p6.routingorder.getActiveNames().each {
    println "${it}"
}

getFailedNames

List all the failed routing order name.

Syntax

List<String> p6.routingorder.getFailedNames()
Example
p6.routingorder.getFailedNames().each {
    println "${it}"
}

deleteCompleted

Delete a completed routing order.

Syntax

void p6.routingorder.deleteCompleted(String name)
Example
p6.routingorder.deleteCompleted("name")

deleteFailed

Delete a failed routing order.

Syntax

void p6.routingorder.deleteFailed(String name)
Example
p6.routingorder.deleteFailed("name")

deleteAllCompleted

Delete all the completed routing order.

Syntax

void p6.routingorder.deleteAllCompleted()
Example
p6.routingorder.deleteAllCompleted()

deleteAllFailed

Delete all the failed routing order.

Syntax

void p6.routingorder.deleteAllFailed()
Example
p6.routingorder.deleteAllFailed()

reprocessAllFailed

Reprocess all the failed routing order.

Syntax

void p6.routingorder.reprocessAllFailed()
Example
p6.routingorder.reprocessAllFailed()

reprocessCompleted

Reprocess a completed routing order.

Syntax

String p6.routingorder.reprocessCompleted(String name)
Example
println p6.routingorder.reprocessCompleted("name")

reprocessFailed

Reprocess a failed routing order.

Syntax

String p6.routingorder.reprocessFailed(String name)
Example
println p6.routingorder.reprocessFailed("name")

searchCompleted

Perform a search for completed routing order

Syntax

void p6.routingorder.searchCompleted(Map configuration, Closure<Boolean> notify)
Parameter: configuration
Configuration Name Description
page the page number (default 0)
pageSize the page size (default 25)
sortColumn (default ‘date’)
sortDirection (default ‘desc’)
from Range date start
to Range date stop
dataPartition
dataType
serviceName
keywords

Note

All the configuration entries are optional.

Parameter: notify

The closure has two arguments:

  • the page number (integer). It’s a zero indexed value.
  • the records (List>)

Record detail

Key Name
date
dataType
name
ids
serviceName
serviceParameters

If you want to read the next page your must return true inside the closure.

If the closure returns false or if the records are empty the next page wont be read.

Example
def conf = [
    page: 0,
    pageSize: 5,
    sortColumn: "date",
    sortDirection: "asc",
    dataPartiton: "TRANSACTION",
    dataType: "TransactionInfo",
    serviceName: "platform6.workflowsteps",
    keywords: "Received",
]
p6.routingorder.searchCompleted(conf) { page, records ->
    println "Page n°" + page + " - records found: " + records.size()
    records.each {
        println " - " + it.get("name")
    }
    true
}

searchFailed

Perform a search for failed routing order

Syntax

void p6.routingorder.searchFailed(Map configuration, Closure<Boolean> notify)

Notice

Take a look to searchCompleted for configuration and notify arguments

Example
def conf = [
    page: 0,
    pageSize: 5,
    sortColumn: "date",
    sortDirection: "asc",
    dataPartiton: "TRANSACTION",
    dataType: "TransactionInfo",
    serviceName: "platform6.workflowsteps",
    keywords: "Received",
]
p6.routingorder.searchFailed(conf) { page, records ->
    println "Page n°" + page + " - records found: " + records.size()
    records.each {
        println " - " + it.get("name")
    }
    // Stop after reading the first two pages (zero indexed)
    page < 1
}

searchActive

Perform a search for active routing order

Syntax

void p6.routingorder.searchActive(Map configuration, Closure<Boolean> notify)

Notice

Take a look to searchCompleted for configuration and notify arguments

Example
def conf = [
    page: 0,
    pageSize: 5,
    sortColumn: "date",
    sortDirection: "asc",
    dataPartiton: "TRANSACTION",
    dataType: "TransactionInfo",
    serviceName: "platform6.workflowsteps",
    keywords: "Received",
]
p6.routingorder.searchActive(conf) { page, records ->
    println "Page n°" + page + " - records found: " + records.size()
    records.each {
        println " - " + it.get("name")
    }
    // Stop after reading the first two pages (zero indexed)
    page < 1
}