Zagreus Action Reference Manual

Version: 1.5.6.0_A01

Last Update: 2023-09-19


List of Zagreus Action Groups and Actions:



Description of Zagreus Actions:

bo:close

Closes the BO connection. All the connections will be closed when execution is finished in the container where the connection is defined, but close action provides a way to close connections manually. The connection is reopened automatically when needed.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection

Examples

<bo:connection xmlns:kafka="http://zagreus.com/kafka" name="BO" cms="BO-Server:6400" user="administrator" password="" cpassword="" auth="secEnterprise"/> <z:format xmlns:kafka="http://zagreus.com/kafka" type="ini" row-separator="" column-separator="" header="false" output="/admin/<-filesystem->/info.ini"> <bo:info connection-name="BO" document-id="773" document-name="" instance-index="last"/> </z:format> <bo:close xmlns:kafka="http://zagreus.com/kafka" connection-name="BO"/>

bo:connection

Defines a connection to a BO server.

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextname of the connection
cmstextcms address of the server
authtextauthentication setting
usertextusername for authentication
passwordtextpassword for authentication
cpasswordtextencrypted password for authentication

Examples

<bo:connection xmlns:kafka="http://zagreus.com/kafka" name="BO" cms="BO-Server:6400" user="administrator" password="" cpassword="" auth="secEnterprise"/> <z:format xmlns:kafka="http://zagreus.com/kafka" type="ini" row-separator="" column-separator="" header="false" output="/admin/<-filesystem->/info.ini"> <bo:info connection-name="BO" document-id="773" document-name="" instance-index="last"/> </z:format> <bo:close xmlns:kafka="http://zagreus.com/kafka" connection-name="BO"/>

bo:copy

Copies an object to a specified location in the repository.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
source-idtextthe id of the object to copy
source-nametextthe path of the object to copy
instance-indextextIf the specified source object is a document and it has instances, it is possible to access them using this attribute. Possible values are positive and negative integers and the strings "first" and "last". Value +1 means the oldest one, -1 the latest.
folder-idtextthe id of the destination folder
folder-nametextthe name of the destination folder
titletextthe new title (filename) of the copied file
include-databooleanfalseif true, the result of the last execution will be copied also, otherwise only the data source definition will be stored
overwritebooleanfalseIf set to true, and a document already exists in the specified folder on the specified name, then it will be overwritten. By default it is false, which means that a new document will be created. E.g. if we want to copy a document called Documentname to the same folder, the first copy will be called "Copy of Documentname", then "Copy of Documentname (2)", (3), etc. Note that if the title attribute was used, the prefix "Copy of " will not be added.
recursivebooleanfalseperform copy recursive

Result Attributes

NameTypeDescription
document-idtextthe id of the created object

Examples

<bo:copy xmlns:kafka="http://zagreus.com/kafka" connection-name="BO" source-id="773" folder-id="3119" title="copied file" include-data="true"/> <z:log xmlns:kafka="http://zagreus.com/kafka"> id of the created object: ${bo_copy.document_id} </z:log>

bo:delete

Deletes an object from the repository.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
document-idtextthe id of the object to delete
document-nametextthe path of the object to delete
instance-indextextIf the specified document has instances, it is possible to access them using this attribute. Possible values are positive and negative integers and the strings "first" and "last". Value +1 means the oldest one, -1 the latest.

Examples

<bo:delete xmlns:kafka="http://zagreus.com/kafka" connection-name="BO" document-id="773"/>

bo:filter-group

Groups filter expressions for the \ref manual_actions_bo_Report "report" action. It can contain filter definitions and other filter-groups also, making possible to compose complex filtering expressions.

Attributes

NameTypePossible ValuesDefault ValueDescription
operatortextAND
OR
the relation of the grouping

Examples

<bo:report xmlns:kafka="http://zagreus.com/kafka" connection-name="BO" document-id="773" format="pdf" output="out.pdf"> <bo:filter-group operator="OR"> <bo:filter variable="Land" operator="=" value="France"/> <bo:filter variable="Dienstleistung" operator="=" value="Bungalow"/> </bo:filter-group> </bo:report>

bo:filter

Defines a filter expression for the \ref manual_actions_bo_Report "report" action. Usually it is contained by "filter-group", but can be used without explicit grouping also, in this case the filter expressions will be stored an implicitly created AND group.

Attributes

NameTypePossible ValuesDefault ValueDescription
variabletextname of the variable to check
operatortext<
<=
=
<>
>
=>
between
in
the relation of the check, its value can be
valuetexta constant value

Examples

<bo:report xmlns:kafka="http://zagreus.com/kafka" connection-name="BO" document-id="773" format="pdf" append-filter="true" output="out.pdf"> <bo:filter variable="Land" operator="=" value="France"/> <bo:filter variable="Dienstleistung" operator="=" value="Bungalow"/> </bo:report>
<bo:report xmlns:kafka="http://zagreus.com/kafka" connection-name="BO" document-id="773" format="pdf" output="out.pdf"> <bo:filter-group operator="OR"> <bo:filter variable="Land" operator="=" value="France"/> <bo:filter variable="Dienstleistung" operator="=" value="Bungalow"/> </bo:filter-group> </bo:report>

bo:import

Stores the action content in the repository.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
folder-idtextthe id of the destination folder
folder-nametextthe name of the destination folder
titletextthe new title (filename) of the imported file
typetextadditional info about the type of the object
overwritebooleanfalseif set to true, the existing file - if any - is overwritten

Result Attributes

NameTypeDescription
document-idtextthe id of the created object

Examples

<bo:import xmlns:kafka="http://zagreus.com/kafka" connection-name="BO" folder-id="3119" title="imported file" type="pdf"> <file:read filename="data.pdf"/> </bo:import> <z:log xmlns:kafka="http://zagreus.com/kafka"> id of the created object: ${bo_import.document_id} </z:log>

bo:info

Gets information about the specified object. The result of the action is a Record that contains the information.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
document-idtextthe id of the object
document-name textthe path of the object
instance-indextextfirst or 1
last or -1
If the document has instances, it is possible to access them by specifying the instance index. Possible values are integers and strings "first" and "last". Index 1 means the oldest one, -1 is the latest.

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:format type="ini"> <bo:info connection-name="BO" document-id="773"/> </z:format> </z:log>

bo:list

Gets the objects from the BO repository which ones match the filtering conditions. For more complex filtering it is possilbe to use "bo:filter" actions in the same way as in the case of "bo:report" action.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
titletextif specified, displays only objects with have this title
parenttextif specified, displays only objects with have this parent
owneridtextif specified, displays only objects with have this ownerid
ownertextif specified, displays only objects with have this owner name
typetextif specified, displays only objects with this type
isinstancetextif specified, displays only objects that have this instance parameter
schedulestatustextif specified, displays only objects this schedule status
recursivebooleanfalseif set, performs the search recursively

Result Attributes

NameTypeDescription
rowcntnumberthe number of rows returned

Examples

<z:foreach xmlns:kafka="http://zagreus.com/kafka" key="item"> <z:in> <bo:list connection-name="BO" parent="0"/> </z:in> <z:log> <z:format type="ini">$item</z:format> </z:log> </z:foreach>

bo:prompt

Specifies prompt answers for BO queries. The content of the action will be the value of the specified prompt question.

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextname of the prompt to answer
idtextid of the prompt to answer, currently not used
indextextindex of the prompt in the document to answer, starting from 1
separatortext the separator character that uses when specifying lists

Examples

<bo:prompt xmlns:kafka="http://zagreus.com/kafka" index="0">France;US</bo:prompt>

bo:report

Queries the BO server for a specified document or report.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
document-idtextthe id of the requested document (or Crystal report)
document-nametextThe full path for the requested document (or Crystal report). We can use the words "Inbox", "Favorites" and "Public Folders" (or "Public" in short) as the first element of the path (here case insensitively); if we do not do this, Public Folders will be chosen. Directories have to be separated by the "/" sign; first character of the path can be "/" (but it is optional). Thus, "INBOX/Joe" and "/inbox/Joe" both means the inbox of the user called Joe; while "/public/Reports/report1", "Reports/report1" and "Public folders/Reports/report1" all mean the same.
instance-indextextfirst or 1
last or -1
If the specified document has instances, it is possible to access them using this attribute. Possible values are positive and negative integers and the strings "first" and "last". Value +1 means the oldest one, -1 the latest.
report-idtextthe id of the embedded report in the document
report-nametextthe name of the embedded report in the document
report-indextextthe index of the embedded report in the document, starting from 1
formattextpdf
xls
xml
csv
html
crystal report
word
ext
rtf
editable rtf
bo
The format of the requested output. xml: only for embedded reports in Desktop or Web Intelligence Documents csv: only for embedded reports in Desktop or Web Intelligence Documents html: only for embedded reports in Desktop Intelligence Documents crystal report: only for Crystal Reports word: only for Crystal Reports ext: only for Crystal Reports rtf: only for Crystal Reports editable rtf: only for Crystal Reports bo: raw Business Object format of the document.
outputtextthe name of the (local) file the result is saved to
refreshbooleantruethis option enables running the report without refreshing it, when specifying refresh="false"
create-instancetextIf we also want to create an instance, set this attribute to "true". In this case the formats usable are limited to those in the action \ref manual_actions_bo_Schedule "schedule". If set to "true", it cancels any attempts for saving-to.
append-filtertextIf you are using filters, and you want to add this filter to the filters of the document which are already set (with AND), set this attribute to "true". If it is "false", the filters actually set will replace those of the document.
overwritetextSaves all modifications (and the new data, if refresh is set to "true") to the document or instance. If saving-to is specified (see below), overwriting refers to the new copy.
save-to-folder-idtextit is possible to save the document to a different folder by specifying the id of the target folder
save-to-folder-nametextit is possible to save the document to a different folder by specifying the name (and path) of the target folder
save-to-titletext It is possible to save the document under a different name by this attribute. If no save-to-folder is specifyed, the new document will appear in the same directory.

Result Attributes

NameTypeDescription
instance_idtext id of the newly created instance (if any)
document_idtext id of the new document
empty_dpcntnumber number of empty dataproviders for the corresponding document
dpcntnumber number of all dataproviders for the corresponding document

Examples

<bo:report xmlns:kafka="http://zagreus.com/kafka" connection-name="boconnection" document-id="622" report-index="1" output="out.pdf" format="pdf"> <bo:prompt index="1">France;US</bo:prompt> </bo:report>

bo:schedule

Schedules the execution of a Web Intelligence or a Desktop Intelligence document.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
document-idtextthe id of the object to schedule
document-nametext the path of the object to schedule
formattextpdf
xls
bo
The destination format. bo: raw Business Object format of the document
wait-on-eventtextthe name of the event to wait for
trigger-eventtextthe name of the event to be triggered
destination-inboxtextthe name of the owner of the inbox to send the result to
instance-titletextthe new title of the instance
starttimetextthe time of the first run
endtimetextthe time of the last run
timing-typetexthourly
daily
weekly
monthly
nthday
firstmonday
lastday
once
oncethe type of timing nthday: nth day of every month firstmonday: first monday of every month lastday: last day of every month
minutenumberthe number of minutes to wait between two runs (only for hourly)
hournumberthe number of hours to wait between two runs (only for hourly)
daynumberthe number of days to wait between two runs (for daily and nthday)
monthnumberthe number of months to wait between two runs (for monthly)
dayofweeknumberThe days to run at. Here we can identify the days by text like Sunday or Thursday; abbreviations are also supported like Sat. Multiple days can be separated by semicolons; intervals can be set by dash. For example, "Mon-Thursday;Sat" is valid. (Only for timingtype="weekly".)

Result Attributes

NameTypeDescription
instance_idtextid of the newly created instance (if any)
document_idtextid of the new document

Examples

<bo:schedule xmlns:kafka="http://zagreus.com/kafka" connection-name="boconn" document-id="5918" format="pdf" starttime="${date('2007-11-24 12:13:00', 'yyyy-MM-dd hh:mm:ss')}" timing-type="weekly" dayofweek="Mon-Wed;Sat"> <bo:prompt index="0">mercury hinkel;Guest</bo:prompt> </bo:schedule>

confluence:add-attachment

Adds a new attachment to a Confluence page.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
page-id*textthe id of the page
filename*textthe name of the attachment on the Confluence server
commenttextthe comment of the attachment on the Confluence server
content-typetextapplication/octet-stream
application/pdf
application/zip
image/jpeg
image/gif
image/png
text/html
text/plain
application/pdftype of the file to be attached

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<confluence:connection xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net/wiki"/> <confluence:add-attachment xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" page-id="123456789" filename="attached.pdf" comment="very important!" content-type="application/pdf"> <file:read filename="/admin/<-filesystem->/infile.pdf" binary="true"/> </confluence:add-attachment>

confluence:add-comment

Adds a new comment to a Confluence page.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
page-id*textthe id of the page
content-typetextapplication/json
application/octet-stream
application/pdf
application/zip
image/jpeg
image/gif
image/png
text/html
text/plain
application/jsontype of the file to be attached

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<confluence:connection xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net/wiki"/> <confluence:add-comment xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" page-id="123456789"> Sample comment text </confluence:add-comment>

confluence:call

Calls a Confluence REST API function.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*the name of the Confluence connection used
api-path*the (relative) API path (e.g. /rest/api/content)
http-methodGET
POST
HEAD
PUT
DELETE
PATCH
the HTTP method used (e.g. GET, POST)
content-typetextapplication/json
application/octet-stream
application/pdf
application/zip
image/jpeg
image/gif
image/png
text/html
text/plain
type of the content
result-typezagreus
json
jsonthe return type of the result (if the operation has a result)

Result Attributes

NameTypeDescription
http_response_codethe HTTP response code received from the Confluence server

Result Table

NameTypePossible ValuesDescription

Examples

<confluence:call xmlns:confluence="http://zagreus.com/confluence" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" connection-name="con" api-path="/rest/api/content" result-type="zagreus" log="true"> <confluence:request-param name="spaceKey" value="ZAGREUS"/> <confluence:request-param name="expand" value="page.body.view,ancestors"/> </confluence:call>

confluence:connection

Defines a Confluence connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
name*textname of the connection
url*textURL of the Confluence installation
token*textthe authentication token. If it is an API token, the format is: "mailaddress:token" BASE64-encoded. For Personal Access Token, specify the token itself
patbooleantruewhether the token is a Personal Access Token. For Server installations, it needs to be set to true, otherwise, for Cloud installation set it to false
spacetextthe space; the value specified here can be overridden in the individual actions
custom-date-formattextyyyy-MM-dd'T'HH:mm:ss.SSSXthis attribute can override the assumed date formats from server side

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<confluence:connection xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net/wiki"/> <confluence:create-page xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" space="SAMPLESPACE" page-title="Trial_page">&lt;body&gt;This is a trial page&lt;/body&gt;</confluence:create-page>
<confluence:connection xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net/wiki" space="SAMPLESPACE"/> <confluence:create-page xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" page-title="Trial_page">&lt;body&gt;This is another trial page&lt;/body&gt;</confluence:create-page>

confluence:create-page

Creates a new Confluence page.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
spacetextthe space for the created page; if not set, the one specified in the connection is used
title*textthe title text of the created page
ancestor-idtextthe ID of the ancestor for the created page; if not set, the new page will be created in the root of the specified space
content-typetextapplication/json
application/octet-stream
application/pdf
application/zip
image/jpeg
image/gif
image/png
text/html
text/plain
application/jsontype of the file to be attached

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<confluence:connection xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net/wiki"/> <confluence:create-page xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" space="SAMPLESPACE" title="Trial_page">This is a trial page</confluence:create-page>
<confluence:connection xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net/wiki" space="SAMPLESPACE"/> <confluence:create-page xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" title="Trial_page">This is another trial page</confluence:create-page>
<confluence:connection xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net/wiki" space="SAMPLESPACE"/> <confluence:create-page xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" title="Trial_page_with_table"> &lt;b&gt;This is a new page content.&lt;/b&gt; &lt;table data-layout="default"&gt; &lt;colgroup&gt;&lt;col /&gt;&lt;col style="width: 120px;" /&gt;&lt;col style="width: 200px;" /&gt;&lt;col style="width: 250px;" /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt;&lt;th class="numberingColumn" /&gt;&lt;th&gt;&lt;p&gt;&lt;strong&gt;sample_header_1&lt;/strong&gt;&lt;/p&gt;&lt;/th&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;sample_header_2&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;sample_header_3&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td class="numberingColumn"&gt;1&lt;/td&gt;&lt;th&gt;&lt;p&gt;123&lt;/p&gt;&lt;/th&gt;&lt;td&gt;&lt;p&gt;456&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;789&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td class="numberingColumn"&gt;2&lt;/td&gt;&lt;th&gt;&lt;p&gt;apple&lt;/p&gt;&lt;/th&gt;&lt;td&gt;&lt;p&gt;orange&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;banana&lt;/p&gt;&lt;p&gt;eggplant2&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; </confluence:create-page>

confluence:delete-comment

Deletes a comment from a Confluence page.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
comment-id*textthe id of the comment

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<confluence:connection xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net/wiki"/> <confluence:delete-comment xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" comment-id="50******77"/>

confluence:delete-page

Deletes a Confluence page.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
page-id*textthe id of the page

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<confluence:connection xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net/wiki"/> <confluence:delete-page xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" page-id="49*****81"/>

confluence:download-page

Creates a new Confluence page.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
spacetextthe space for the created page; if not set, the one specified in the connection is used
page-title*textthe title text of the created page
ancestor-idtextthe ID of the ancestor for the created page; if not set, the one ...
typetextjson
zagreus
jsonthe result type

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<confluence:connection xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net/wiki"/> <confluence:create-page xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" space="SAMPLESPACE" page-title="Trial_page">&lt;body&gt;This is a trial page&lt;/body&gt;</confluence:create-page>
<confluence:connection xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net/wiki" space="SAMPLESPACE"/> <confluence:create-page xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" page-title="Trial_page">&lt;body&gt;This is another trial page&lt;/body&gt;</confluence:create-page>

confluence:get-page

Retrieves a Confluence page.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
spacetextthe space for the page (in case when the page-title is set); if not set, the one specified in the connection is used
contentbooleantrueif set, the content of the page is also retrieved

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
idtextthe ID of the page
titletextthe title of the page
versionnumberthe version of the page
contenttextthe type of the issue
commentsnumberthe number of comments of the page
attachmentsnumberthe number of attachments of the page
sub-pagesnumberthe number of sub-pages if the page

Examples

<confluence:connection xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net/wiki"/> <confluence:get-page xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" page-id="" page-title="Sample page title" content="true" log="true"/>

confluence:list-attachments

Lists the attachments of a given page.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
page-id*textthe id of the page

Result Attributes

NameTypeDescription
rowcntnumberthe number of comments retrieved
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
idtextthe ID of the attachment
filenametextthe filename of the attachment
content-typetextthe content type of the attachment (e.g. application/pdf)
sizenumberthe file size of the attachment (in bytes)
commenttextthe comment of the attachment
creation-timetextthe time when the the comment of the attachment was created
author-idtextthe user ID of the user who is the owner of the attachment
author-nametextthe display name of the user who is the owner of the attachment (e.g. "John Smith")
author-emailtextthe e-mail address of the user who is the owner of the attachment. Due to GDPR restrictions affecting the Confluence installations, this might not be visible (depending on the actual setting of the user)
web-linktextthe web link of the attachment
download-linktextthe download link of the attachment

Examples

<confluence:list-attachments xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" page-id="48******5" log="true"/>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:confluence="http://zagreus.com/confluence">show the pdf attachments</z:log> <z:filter xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:confluence="http://zagreus.com/confluence" key="s" where-expr="s.'content-type'='application/pdf'" log="true"> <confluence:list-attachments connection-name="con" page-id="48******5"/> </z:filter>

confluence:list-comments

Lists the comments of a given page.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
page-id*textthe id of the page

Result Attributes

NameTypeDescription
rowcntnumberthe number of comments retrieved
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
idtextthe ID of the comment
contenttextthe content (i.e. text) of the comment
creation-timedatethe time when the comment was created
author-idtextthe user ID of the user who is the author of this comment
author-nametextthe display name of the user who is the author of this comment (e.g. "John Smith")
author-emailtextthe e-mail address of the user who is the author of this comment. Due to GDPR restrictions affecting the Jira installations, this might not be visible (depending on the actual setting of the user)

Examples

<confluence:list-comments xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" page-id="48******5" log="true"/>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:confluence="http://zagreus.com/confluence">show the comment of a specific user</z:log> <z:filter xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:confluence="http://zagreus.com/confluence" key="s" where-expr="s.'author-id'='60*****50'" log="true"> <confluence:list-comments connection-name="con" page-id="48******5"/> </z:filter>

confluence:list-pages

Lists all the pages of a space, or the sub-pages of a given page.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
spacetextthe space for the listed pages; if not set, the one specified in the connection is used. It is ignored if the page-id is set
page-idtextthe id of the parent page. If not set, all pages of the given space will be listed

Result Attributes

NameTypeDescription
rowcntnumberthe number of comments retrieved
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
idtextthe ID of the page or sub-page
titletextthe title of the page or sub-page
statustextthe status of the page or sub-page
ancestor-idtextthe ID of the ancestor page of the sub-page (if any)
ancestor-titletextthe title of the ancestor page of the sub-page (if any)

Examples

<confluence:list-pages xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" page-id="48******5" log="true"/>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:confluence="http://zagreus.com/confluence">show all pages and sub-pages in the "SAMPLESPACE" space</z:log> <confluence:list-pages xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" SPACE="SAMPLESPACE" log="true"/>

confluence:request-param

Refers to a parameter of the confluence:call action

Attributes

NameTypePossible ValuesDefault ValueDescription
name*name of the parameter
valuevalue of the parameter. Does not have to be URL-encoded

Examples

<confluence:call xmlns:confluence="http://zagreus.com/confluence" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" connection-name="con" api-path="/rest/api/content" result-type="zagreus" log="true"> <confluence:request-param name="spaceKey" value="ZAGREUS"/> <confluence:request-param name="expand" value="page.body.view,ancestors"/> </confluence:call>

confluence:update-comment

Updates an existing comment in a Confluence page.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
comment-id*textthe id of the comment
content-typetextapplication/json
application/octet-stream
application/pdf
application/zip
image/jpeg
image/gif
image/png
text/html
text/plain
application/jsontype of the comment
appendbooleanfalseif set to true, the content will be appended to the end of the original message

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<confluence:connection xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net/wiki"/> <confluence:update-comment xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" comment-id="123456789"> edited comment text </confluence:update-comment>

confluence:update-page

Updates an existing Confluence page.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
spacetextthe space for the updated page; if not set, the one specified in the connection is used
appendbooleantrueif set, the specified text will be appended to the existing content
content-typetextapplication/json
application/octet-stream
application/pdf
application/zip
image/jpeg
image/gif
image/png
text/html
text/plain
application/jsontype of the file to be attached

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<confluence:connection xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net/wiki"/> <confluence:update-page xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" space="SAMPLESPACE" page-title="Sample page" append="false"> We now overwrite the content of 'Sample page' in the root of 'SAMPLESPACE' </confluence:update-page>
<confluence:connection xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net/wiki"/> <confluence:update-page xmlns:confluence="http://zagreus.com/confluence" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" space="SAMPLESPACE" page-id="123456789" append="true"> Append this text to the content of page with ID 123456789 </confluence:update-page>

db:begin

Begins a new sql transaction. The transaction can be interrupted with db:rollback action.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection

Result Attributes

NameTypeDescription
execution_timenumberTime interval while the action is executed.

Examples

<db:begin xmlns:kafka="http://zagreus.com/kafka" connection-name="sql"/> <db:sql xmlns:kafka="http://zagreus.com/kafka" connection-name="sql">delete from table</db:sql> <db:rollback xmlns:kafka="http://zagreus.com/kafka" connection-name="sql"/>

db:call

Executes a stored procedure specified by the procedure name.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textName of the connection. If the called procedure has output arguments, these should be registered by the "param" action, and their value will be accessible via the result attributes of action.
dbms-outputbooleanfalseIf set to true, the output of the call will be put into the result attribute "dbms_output". Works only for Oracle-type DBMS.

Result Attributes

NameTypeDescription
rowcntnumbernumber of rows generated
dbms_outputtextthe DBMS output
execution_timenumberTime interval while the action is executed.

Examples

<db:call xmlns:kafka="http://zagreus.com/kafka" connection-name="sql"> <z:text>procedurename('input param', ?)</z:text> <db:param id="1" type="varchar" name="out"/> </db:call> <z:log xmlns:kafka="http://zagreus.com/kafka">out=${db_call.out}</z:log>

db:close

Closes the database connection. All the connections will be closed when execution is finished in the container where the connection is defined, but close action provides a way to close connections manually. The connection is reopened automatically when needed.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection

Result Attributes

NameTypeDescription
execution_timenumberTime interval while the action is executed.

Examples

<db:jdbc-connection xmlns:kafka="http://zagreus.com/kafka" name="zagreus" domain="derby" driver="org.apache.derby.jdbc.EmbeddedDriver" server="localhost" port="3336" user="zagreus" password="" cpassword="#20#30#24#32#-128#56#67#74" database="zagreus" null-value="" date-format="" time-format="" number-format="" browse-table="/admin/editor"/> <db:sql xmlns:kafka="http://zagreus.com/kafka" connection-name="zagreus">select * from et_account;</db:sql> <db:close xmlns:kafka="http://zagreus.com/kafka" connection-name="zagreus"/>

db:commit

Commits the current sql transaction.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection

Result Attributes

NameTypeDescription
execution_timenumberTime interval while the action is executed.

Examples

<db:begin xmlns:kafka="http://zagreus.com/kafka" connection-name="sql"/> <db:sql xmlns:kafka="http://zagreus.com/kafka" connection-name="sql">delete from table</db:sql> <db:commit xmlns:kafka="http://zagreus.com/kafka" connection-name="sql"/>

db:jdbc-connection

Defines a jdbc connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextname of the connection
domain*textdomain name in the connection string
driver*textjava class name of the jdbc driver
server*textSQL server name or address
portnumberport address of the SQL server
usertextuser name when authentication is needed
passwordtextpassword for user authentication
cpasswordtextencrypted password for user authentication
databasetextname of the required database
connection-stringtextThe jdbc connection string. If it is not specified, Zagreus builds the connection string from the connection data. This property allows expert users to override the generated value. Username and password attributes must be filled. Those parameters cannot be passed in connection-string. Oracle connection can be defined only by using attribute connection-string.
cstringtextthe same as connection-string
autocommittrueIf autocommit mode is enabled, each SQL statement forms a single transaction on its own.
null-valueThe value which will be used instead of null values.
number-formattextThe numeric type result fields of the db:sql and db:execute actions will be formatted following the specified format.
date-formattextThe date type result fields of the db:sql and db:execute actions will be formatted following the specified format.
time-formattextThe time type result fields of the db:sql and db:execute actions will be formatted following the specified format.

Result Attributes

NameTypeDescription
domaintextdomain name in the connection string
drivertextjava class name of the jdbc driver
servertextSQL server name or address
portnumberport address of the SQL server
usertextuser name when authentication is needed
dbtextname of the required database
autocommitbooleanIf autocommit mode is enabled, each SQL statement forms a single transaction on its own.
null-valueThe value which will be used instead of null values
date-formattextThe format of the date type result fields applied in the db:sql and db:execute actions
time-formattextThe format of the time type result fields applied in the db:sql and db:execute actions
number-formattextThe format of the numeric type result fields applied in the db:sql and db:execute actions
execution_timenumberTime interval while the action is executed.

Examples

<description xmlns:kafka="http://zagreus.com/kafka">SQL Server</description> <db:jdbc-connection name="mssql" domain="sqlserver" driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" server="my.server.com" port="1433" user="my-user" password="my-password" database="my-database" autocommit="true"/>
<description xmlns:kafka="http://zagreus.com/kafka">SQL Server connection string. Note: since Zagreus v1.5.5.6 new mssql driver is in use: sqljdbc_11.2. Because of that if SSL is not in use apply the following parameters: encrypt=false;trustServerCertificate=true</description> <db:jdbc-connection name="mssql" domain="sqlserver" driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" user="my-user" password="my-password" autocommit="true" connection-string="jdbc:sqlserver://my.server.com:1433;databaseName=my-db"/>
<description xmlns:kafka="http://zagreus.com/kafka">Oracle</description> <db:jdbc-connection name="oracle" domain="oracle" driver="oracle.jdbc.driver.OracleDriver" user="my-user" password="my-password" connection-string="jdbc:oracle:thin:@my.server.com:1521:MYDB" autocommit="true"/>
<description xmlns:kafka="http://zagreus.com/kafka">MySQL</description> <db:jdbc-connection name="mysql" domain="mysql" driver="com.mysql.jdbc.Driver" server="my.server.com" port="3306" user="my-user" password="my-password" database="my-db" autocommit="true"/>
<description xmlns:kafka="http://zagreus.com/kafka">MySQL connection string</description> <db:jdbc-connection name="mysql" domain="mysql" driver="com.mysql.jdbc.Driver" user="my-user" password="my-password" autocommit="true" connection-string="jdbc:mysql://my.server.com:3306/my-database"/>
<description xmlns:kafka="http://zagreus.com/kafka">Postgresql</description> <db:jdbc-connection name="postgresql" domain="postgresql" driver="org.postgresql.Driver" server="my.server.com" port="5432" user="my-user" password="my-password" database="myDB" autocommit="false"/>
<description xmlns:kafka="http://zagreus.com/kafka">Postgresql connection string</description> <db:jdbc-connection name="postgresql" domain="postgresql" driver="org.postgresql.Driver" server="" port="" user="my-user" password="my-password" database="" autocommit="false" connection-string="jdbc:postgresql://my.server.com:5432"/>
<description xmlns:kafka="http://zagreus.com/kafka">Teradata</description> <db:jdbc-connection name="teradata" domain="teradata" driver="com.mysql.jdbc.Driver" user="my-user" password="my-password" connection-string="jdbc:teradata://my.server.com/TMODE=ANSI,CHARSET=UTF8,DATABASE=myDB" autocommit="true"/>
<description xmlns:kafka="http://zagreus.com/kafka">Postgresql connection string</description> <db:jdbc-connection name="teradata" domain="teradata" driver="com.mysql.jdbc.Driver" user="my-user" password="my-password" connection-string="jdbc:teradata://my.server.com0/TMODE=ANSI,CHARSET=UTF8,DATABASE=my-database" autocommit="true"/>
<description xmlns:kafka="http://zagreus.com/kafka">Sqlite connection string</description> <db:jdbc-connection name="sqlite" domain="sqlite" driver="org.sqlite.JDBC" server="localhost" port="" user="" password="" database="" autocommit="false" connection-string="jdbc:sqlite:c:\path\datafile.db"/>

db:load

Inserts data rows into the specified table of the target connection. It can handle various source-data elements, like: db:sql, excel:read or z:parse.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the target connection
table*textTarget table name. For SQL-Server, it is recommended to use SCHEMA.TABLE format.
replace-methodtextappend
delete
truncate
appendThe way how to handle existing data in the target table. "append": append all new rows to the existing ones. "delete": uses delete fromsql command to delete all existing rows before inserting new rows. "truncate": uses truncate table sql command to truncate table before inserting new rows. WARNING! In Oracle 'truncate table' cannot be used in transaction!
transactiontextall
delete
insert
allThe way how to use transactions during deleting / inserting."all": applies transaction around deleting and inserting together."delete": applies transaction only for deleting."insert": applies transaction only for inserting.
executebooleantrueIf the action actually executes the generated commands. If true, it is generating and executing the commands, otherwise it is only generating the commands.
source-databooleanA custom child action. The result of the child db:sql action provides the data for the load action. The connection-name of the child db:sql action is the source-connection-name.

Result Attributes

NameTypeDescription
deleted_rowcntnumbernumber of rows deleted. Can be still 0 if replace-method was set to "truncate"
inserted_rowcntnumbernumber of rows inserted
execution_timenumberTime interval while the action is executed.

Result Table

NameTypePossible ValuesDescription

Examples

<db:load xmlns:kafka="http://zagreus.com/kafka" connection-name="target-connection" table="test_object" replace-method="delete" transaction="insert" execute="true" alias="commands"> <db:source-data> <db:sql connection-name="source-connection">select object_id, size, creation_time from test_table</db:sql> </db:source-data> </db:load>

db:odbc-connection

Defines an odbc connection. NOTICE: ODBC connections are not supported in Java8! Please, use JDBC connection instead if Zagreus runs on Java8!

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextname of the connection
dsn*textODBC Data Source Name
usertextuser name when authentication is needed
passwordtextpassword for user authentication
cpasswordtextencrypted password for user authentication
databasetextname of the required database
autocommittrueAutocommit
number-formattextThe numeric type result fields of the db:sql and db:execute actions will be formatted following the specified format.
date-formattextThe date type result fields of the db:sql and db:execute actions will be formatted following the specified format.
time-formattextThe time type result fields of the db:sql and db:execute actions will be formatted following the specified format.

Examples

<db:odbc-connection xmlns:kafka="http://zagreus.com/kafka" name="sql" dsn="zagreus" user="zagreus" password="zagreus" db="zagreus"/>

db:param

Set an input parameter for action "sql", or register an argument for stored procedure calling "call".

Attributes

NameTypePossible ValuesDefault ValueDescription
id*textthe index of the output argument
type*textbit
tinyint
smallint
integer
bigint
float
real
double
numeric
decimal
char
varchar
longvarchar
date
time
timestamp
binary
varbinary
longvarbinary
boolean
blob
clob
Type of the argument.
nametextName of the variable that will store the argument. The arguments should be represented by a question-mark character in the calling sql expression. The index of the argument can be calculated by the number of the preceding output arguments in the calling expression, plus 1. The output argument will be accessible via the db:call action result attributes, using the specified name. The input arguments should be set without name specified. Some database server requires that the type of the output argument should be known, that are specified in the type attribute.

Examples

<db:call xmlns:kafka="http://zagreus.com/kafka" connection-name="sql"> <z:text>procedurename(&rsquo;input param&rsquo;, ?)</z:text> <db:param id="1" type="varchar" name="out"/> </db:call> <z:log xmlns:kafka="http://zagreus.com/kafka">out=${db_call.out}</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <db:sql connection-name="sql"> Insert into country(comment,country_code,country_post_code,tel_code) Values(?, ?, ?, ?) <db:param id="1" type="varchar">Test</db:param> <db:param id="2" type="varchar">xx</db:param> <db:param id="3" type="varchar">yy</db:param> <db:param id="4" type="integer">99</db:param> </db:sql> </z:log>

db:rollback

Rolls back the current sql transaction.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection

Result Attributes

NameTypeDescription
execution_timenumberTime interval while the action is executed.

Examples

<db:begin xmlns:kafka="http://zagreus.com/kafka" connection-name="sql"/> <db:sql xmlns:kafka="http://zagreus.com/kafka" connection-name="sql">delete from table</db:sql> <db:rollback xmlns:kafka="http://zagreus.com/kafka" connection-name="sql"/>

db:sql

Executes an sql command or performs an sql query. It is possible to use the parameterized format, i.e. setting parameter values applying db:param actions. In this case binary contents also can be sent.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
log-sqlbooleanfalseIf set, the executed SQL command will be logged.

Result Attributes

NameTypeDescription
executed_sqltextthe executed SQL command
rowcntnumbernumber of resulted rows
execution_timenumberTime interval while the action is executed.

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <db:sql connection-name="sql"> Insert into country(comment,country_code,country_post_code,tel_code) Values(&rsquo;Test&rsquo;, &rsquo;xx&rsquo;, &rsquo;yy&rsquo;, 99) </db:sql> <db:sql connection-name="sql"> Select * from country </db:sql> </z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <db:sql connection-name="sql"> Insert into country(comment,country_code,country_post_code,tel_code) Values(?, ?, ?, ?) <db:param id="1" type="varchar">Test</db:param> <db:param id="2" type="varchar">xx</db:param> <db:param id="3" type="varchar">yy</db:param> <db:param id="4" type="integer">99</db:param> </db:sql> </z:log>

excel:data

Defines input source for the "workbook" action. The content of the action will be inserted into the generated xls resource. Inserting an exported MSTR report (via the "mstr:report" action) will insert the data into the Excel file along with the formatting (i.e. colors, bold or italic fonts, etc.).

Attributes

NameTypePossible ValuesDefault ValueDescription
sheettextName of the Excel sheet to write. If this attribute is not specified, the system tries to use the result-attribute "resultname". If it does not exist, value "data" will be used.
rownumberthe starting row position where to write
columntextThe starting column position where to write. Excel column notation is used, e.g. the first column is A.
headerbooleantrueif set to "true", the first row will contain the column names of the source
reuseThe source sheet name from the template xls file. If the original sheet contained diagrams, they might be omitted from the new sheet, or they can still refer to the original sheet
formattingbooleantrueif set to "true", cell formats will be modified according to the source style, otherwise the cell formats won't be changed
locationtextbody
headerleft
headercenter
headerright
footerleft
footercenter
footerright
bodytarget location on the sheet
rel-rownumberOffset for the starting row position. The new starting row position is calculated as the sum of the previous starting row position and the value set in the "rel-row" attribute.
rel-columnnumberOffset for the starting column position. The new starting column position is calculated as the sum of the previous starting column position and the value set in the "rel-column" attribute.
column-widthnumberColumn width specification. Its format is a semicolon (;) separated list of column info, where column info describes the width of a column in characters. Column info has the format "columnname:width", width value can be "auto", meaning that the corresponding column width will be fit to the inserted content. It is possible to use more values (including "auto" keyword as well) separated by comma (,), specifying the widths of the following columns, allowing shorter expression form. Thus, "A:10;B:20;C:30;F:5" and "A:10,20,30;F:5" are equivalent, and "A:10,auto,auto;F:5" is also valid.
preservercolumnwidthbooleanfalseif set to "true", the width of the columns won't be changed
protectionbooleanfalseIf set to "true", the cells of the target sheet will be read-only protected. Protection needs password or cpassword.
passwordtextPassword for the protection. Using this password the sheet can be locked.
cpasswordtextEncrypted password for the protection. To generate encrypted passwords, use "Tools/Password converter..." in GUI.
header-formattextSpecifies the formatting parameters for the header part. It overrides the formatting settings from the source.
data-formattextnumber-format
font-name
color
font-size
font-style:italic
font-weight:bold
background-color
text-align:left/center/right
vertical-align:top/middle/bottom
border-style:solid
border-style-top:solid
border-style-bottom:solid
border-style-left:solid
border-style-right:solid
border-color
border-color-top
border-color-bottom
border-color-left
border-color-right
word-wrap
Specifies the formatting parameters for the body part. It overrides the formatting settings from the source. Multiple values can be used (separated by ";").
macro-beforetextName of the macros that will be executed before inserting data. Multiple macros can be separated by ";"s.
macro-aftertextName of the macros that will be executed after inserting data. Multiple macros can be separated by ";"s.
autodetect-typesbooleantrueIf set to "true" data types will be detected automatically (number, date, etc.). If set to "false" everything will be handled as text.
mstrcolumnheaderbooleanfalseif set to "true", the MSTR column header will be displayed
printareatextSets the print area for the given sheet (in the standard format, e.g. "A4:E43"). "none" results in removing the previously set print area (not implemented for binary Excel format)

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<excel:workbook xmlns:kafka="http://zagreus.com/kafka" output="out.xls"> <excel:data sheet="sheet" row="1" column="A" header="true" location="body"> <db:sql connection-name="oracle">select * from test4</db:sql> </excel:data> </excel:workbook>
<excel:workbook xmlns:kafka="http://zagreus.com/kafka" output="out.xls"> <excel:data sheet="sheet" rel-row="1" rel-column="" header="true"> <mstr:report connection-name="mstr_local" id="0A3F16F7443C5F2C5BCD9DB7F0ADBAEF"> <mstr:prompt id="917B871C4741EB7C46C2348DFA7627C5" value="South;Central"/> </mstr:report> </excel:data> </excel:workbook>
<excel:workbook xmlns:kafka="http://zagreus.com/kafka" output="out.xls"> <excel:data sheet="x" column-width="auto"> <z:parse row-separator=";" column-separator="," header="true">a,b,c;MMMM,xxxxxxxxxxxxx,y;MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM,0,0</z:parse> </excel:data> </excel:workbook>
<excel:workbook xmlns:kafka="http://zagreus.com/kafka" hide-unused-sheets="false"> <z:foreach key="element" in="${[1,2,3,4]}"> <excel:data sheet="sheet$element" row="1" column="A" header="true" column-width="auto"> <z:parse row-separator=";" column-separator="," column-names="" fixed-fields="" header="true" type="" _x="12" _y="2" _w="-1" _h="-1" _v="0">A$element,B,C;1,2,3;4,5,6;7,8,9</z:parse> </excel:data> </z:foreach> </excel:workbook>
<excel:workbook xmlns:kafka="http://zagreus.com/kafka" template="QCTemplate.xls" output="out.xls"> <excel:data sheet="Tabelle1" row="3" column="A" header="true" header-format="font-style:italic; color:#ff0000"> <z:parse row-separator=";" column-separator="," header="true">a,b,c,d;1,2,3,4;5,6,7,8</z:parse> </excel:data> <excel:data sheet="Tabelle2" row="3" column="A" header="true" column-width="A:20,30,40,50" header-format="font-style:italic; color:#ff0000"> <file:read filename="x2.xml"/> </excel:data> </excel:workbook>

excel:info

Reads sheet names from a workbook.

Attributes

NameTypePossible ValuesDefault ValueDescription
filename*textthe name of the excel file to load

Result Attributes

NameTypeDescription
sheetcntnumbernumber of sheets in the workbook
rowcntnumbernumber of rows generated (same as sheetcnt)
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <excel:info filename="sample.xls"/> </z:log> <z:log xmlns:kafka="http://zagreus.com/kafka">num of sheets=${excel_info.sheetcnt}</z:log>

excel:read

Reads data from an excel resource.

Attributes

NameTypePossible ValuesDefault ValueDescription
filename*textthe name of the excel file to load
sheettextthe sheet name to read from
rownumberthe starting row of the data in the sheet to read
columntextThe starting column of the data in the sheet to read. Excel column notation is used, e.g. the name of the first column is A.
to-rownumberThe ending row of the data in the sheet to read. If not specified, the parsing will continue until the first row that starts (at position column) with an empty cell.
to-columntextThe ending column of the data in the sheet to read. If not specified, the parsing will continue until the first empty cell.
headerbooleantrueIf yes or true, the first row will be treated as the header, the column names of the returned table will be imported. Otherwise the column indices will be used as column names.
hidden-databooleanfalseIf yes or true, all the cells will be read, otherwise only non hidden cells will be processed. Default value is true. Used only for xslx workbooks.
bigintbooleanfalseif yes or true, all the cells containing a number will be treated as strings

Result Attributes

NameTypeDescription
rowcntnumbernumber of rows generated
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <excel:read filename="sample.xls" sheet="users" row="2" column="B"/> </z:log>

excel:workbook

Creates an excel resource in Office 97 or Office 2007 (XLSX) binary format.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextName of the connection for the excel server. If not specified or empty, the built-in jxl engine will be used.
templatetextThe position of the excel file used as a template. This xls file will be read, and its sheets can be reused using the attribute "reuse" of "data" action.
hide-unused-sheetsbooleanfalseif set to "false", all the sheets will be copied from the template, otherwise only those that are used in a "data" action
excel2007booleantrueIf set to "true", the workbook will be created in the Office 2007 ("xlsx") format, otherwise an old, binary format workbook will be created. When using the "template" attribute, the version of the template Excel file will be applied, regardless of the "excel2007" setting.
recalculatetexttrue
false
force
falseIf set to "true", the formulas in the workbook will be recalculated before saving. Setting it to "force" we force Excel to recalculate the formulas when opening the workbook.
streamingbooleanfalseWhen set to "true", the workbook will be created in a "streaming" way, where only the last 100 rows of the current sheet can be accessed during creation. The action will use much less memory, but can provide a redundant (much larger) Excel file, or sometimes it fails to create a workbook (if we try to access rows which were already written to disk). Can only be used with "Excel 2007" workbook format. Also note that, when using together with the "template" attribute, the cells of the template workbook cannot be accessed in any way: it is only possible to write into rows after these cells (or on a newly created sheet).
outputtextIf specified, the results of the action will be saved to the given location.

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<excel:workbook xmlns:kafka="http://zagreus.com/kafka" output="sample.xls" template="template.xls" hide-unused-sheets="yes"> <excel:data sheet="xxx" row="2" column="D" reuse="yyy"> <file:read filename="test.xml"/> </excel:data> </excel:workbook>
<excel:workbook xmlns:kafka="http://zagreus.com/kafka" output="out.xls"> <excel:data sheet="sheet" row="1" column="A" header="true" location="body"> <db:sql connection-name="oracle">select * from test4</db:sql> </excel:data> </excel:workbook>
<excel:workbook xmlns:kafka="http://zagreus.com/kafka" output="out.xls"> <excel:data sheet="sheet" rel-row="1" rel-column="" header="true"> <mstr:report connection-name="mstr_local" id="0A3F16F7443C5F2C5BCD9DB7F0ADBAEF"> <mstr:prompt id="917B871C4741EB7C46C2348DFA7627C5" value="South;Central"/> </mstr:report> </excel:data> </excel:workbook>
<excel:workbook xmlns:kafka="http://zagreus.com/kafka" format="excel2007" output="out.xls"> <excel:data sheet="x" column-width="auto"> <z:parse row-separator=";" column-separator="," header="true">a,b,c;MMMM,xxxxxxxxxxxxx,y;MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM,0,0</z:parse> </excel:data> </excel:workbook>
<excel:workbook xmlns:kafka="http://zagreus.com/kafka" template="input" output="out.xls" recalculate="true"> <excel:data sheet="1" row="1" column="A"> <file:read filename="mstr1.xml"/> </excel:data> <excel:data sheet="2" row="1" column="A"> <file:read filename="mstr2.xml"/> </excel:data> <excel:data sheet="3" row="1" column="A"> <file:read filename="mstr3.xml"/> </excel:data> <excel:data sheet="4" row="1" column="A"> <file:read filename="mstr4.xml"/> </excel:data> </excel:workbook>

file:close

Closes the file connection. All the connections will be closed when execution is finished in the container where the connection is defined, but close action provides a way to close connections manually. The connection is reopened automatically when needed.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<file:connection xmlns:kafka="http://zagreus.com/kafka" name="conn" filename="/groups/public/Tutorial/File/data.txt" mode="read" encoding="UTF-8"/> <z:log xmlns:kafka="http://zagreus.com/kafka"> <file:readline connection-name="conn"/> </z:log> <file:close xmlns:kafka="http://zagreus.com/kafka" connection-name="file_close"/>

file:connection

Defines a file connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextname of the connection
filenametextname of the file to open
modetextread
write
append
readmode for opening
encodingtextISO-8859-1
ISO-8859-2
UTF-8
UTF-16
UTF-32
UTF-16LE
UTF-16BE
UTF-32LE
UTF-32BE
UTF-8the encoding to use when connecting to the file

Result Attributes

NameTypeDescription
filenametextname of the created file and its path
modetextmode for opening
execution_timenumberthe length of time the action was executed

Examples

<file:connection xmlns:kafka="http://zagreus.com/kafka" name="xfile" filename="x.txt"/> <z:variable xmlns:kafka="http://zagreus.com/kafka" name="line"/> <z:while xmlns:kafka="http://zagreus.com/kafka"> <z:test> <file:readline connection="xfile" alias="line"/> </z:test> <z:log>$line</z:log> </z:while>

file:copy

Copies a resource to a specified location. When parameter to is specified and it is a folder, the file will be copied to that folder with the same name. When parameter to is specified and it is a file, the target file will be overwritten with the source file. When parameter to is NOT specified, the folder and the name values can be specified using to-folder and to-name parameters, respectively. In one of these value is empty, the value (folder or name) of the source will be used.

Attributes

NameTypePossible ValuesDefault ValueDescription
fromtextsource data address
totexttarget data address
to-foldertexttarget folder
to-nametexttarget name
overwritetexttrueIf a resource with the name used already exists in the target folder, we can set with this attribute what will happen. Value "true" indicates that this file will be overwritten; value "false" indicates that no file will be created. If some other string is specified (like "Copy of "), it will be added to the beginning of the resource title; if there is also a resource with this name, the first free number will be added to the end (like "Copy of Test Script (16)").
all-versionsbooleanfalseshould we copy all versions of the resource or not

Result Attributes

NameTypeDescription
execution timenumbertime interval while the action is executed

Examples

<file:copy xmlns:kafka="http://zagreus.com/kafka" from="/source/file/path/source.txt" to="/target/file/path/target.txt"/>
<file:copy xmlns:kafka="http://zagreus.com/kafka" from="/source/file/path/source.txt" to-folder="/target/file/path" overwrite="Copy of"/>

file:delete

Deletes the resource at the specified location.

Attributes

NameTypePossible ValuesDefault ValueDescription
filenametextdata location

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<z:for xmlns:kafka="http://zagreus.com/kafka" var="file"> <z:in> <file:dir path="/admin/tempfolder"/> </z:in> <file:delete filename="$file"/> </z:for>

file:dir

Return the list of files in the folder at a specified location or returns details if the target is a file.

Attributes

NameTypePossible ValuesDefault ValueDescription
pathtextFolder or file location. In case of a file the result will be only the specified file with its details if details=true.
filenametextfilter expression for file names that can contain wildcard characters
detailsbooleanfalsewhether to include file details
recursivebooleanfalsewhether to list files recursively

Result Attributes

NameTypeDescription
rowcntnumberthe number of resources listed
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
filenametextthe relative file name of the actual resource
idtextthe id of the actual resource
sizenumberfile size (in bytes)
dirbooleanwhether the actual resource is a folder
typetextuser home
group home
folder
script
cron time schedule
event schedule
file
template
connection
filesystem
the type of the actual resource
ownertextthe owner (i.e. user) of the actual resource
creationtimedatethe date when the actual resource was created. If it is not available (e.g. on the file system), it will be the last modification time
createdbytextthe user who created the actual resource (if available)
lastmodtimedatethe date when the actual resource was last modified
lastmodifiedbytextthe user who last modified the actual resource (if available)
contenttypetextthe content type of the actual resource (e.g. "application/octet-stream")
scheduledbooleanwhether the actual resource is scheduled
hiddenbooleanwhether the actual resource is hidden
readablebooleanwhether the actual resource is readable
writablebooleanwhether the actual resource is writable
executablebooleanwhether the actual resource is executable
descriptiontextthe description of the actual resource
lastmodificationtimedatethe date when the actual resource was last modified; same as "lastmodtime"
filecntnumberthe number of (directly) contained non-folder resources, if the actual resource is a folder; otherwise 0
foldercntnumberthe number of (directly) contained folders, if the actual resource is a folder; otherwise 0
allfilecntnumberthe number of (directly or indirectly) contained non-folder resources, if the actual resource is a folder; otherwise 0
allfoldercntnumberthe number of (directly or indirectly) contained folders, if the actual resource is a folder; otherwise 0

Examples

<z:foreach xmlns:kafka="http://zagreus.com/kafka" key="item-name" parallel="1"> <z:in> <file:dir path="/path/to/folder" filename="" details="false" recursive="false"/> </z:in> <z:log level="" null-format="null">$item-name</z:log> </z:foreach>
<file:dir xmlns:kafka="http://zagreus.com/kafka" path="/path/to/folder" recursive="true" output="filelist.txt"/>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <file:dir path="/path/to/folder" filename="*.txt" details="true" recursive="true"/> </z:log>

file:eof

Tests the file connection for "End of File" status.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextName of the file connection

Result Attributes

NameTypeDescription
execution_timenumberTime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<file:connection xmlns:kafka="http://zagreus.com/kafka" name="xfile" filename="x.txt"/> <z:variable xmlns:kafka="http://zagreus.com/kafka" name="line"/> <z:while xmlns:kafka="http://zagreus.com/kafka"> <z:test> <z:not> <file:eof connection-name="xfile"/> </z:not> </z:test> <z:log> <file:readline connection-name="xfile"/> </z:log> </z:while>

file:exist

Returns true value if the data in the specified location exists.

Attributes

NameTypePossible ValuesDefault ValueDescription
filenametextFile location. In the last part of the path, wildcards (* and ?) can be used.

Result Attributes

NameTypeDescription
execution_timenumberTime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<z:if xmlns:kafka="http://zagreus.com/kafka"> <z:test> <file:exist filename="/admin/test.txt"/> </z:test> <z:then> <z:log>File exists</z:log> </z:then> <z:else> <z:log>File not exist</z:log> </z:else> </z:if>
<file:exist xmlns:kafka="http://zagreus.com/kafka" filename="/admin/*.txt" log="true"/>

file:move

Moves a resource to a specified location When parameter to is specified and it is a folder, the file will be copied to that folder with the same name. When parameter to is specified and it is a file, the target file will be overwritten with the source file. When parameter to is NOT specified, the folder and the name values can be specified using to-folder and to-name parameters, respectively. In one of these value is empty, the value (folder or name) of the source will be used.

Attributes

NameTypePossible ValuesDefault ValueDescription
fromtextsource data address
totexttarget data address
to-foldertexttarget folder
to-nametexttarget name
overwritetexttrueIf a resource with the name used already exists in the target folder, we can set with this attribute what will happen. Value "true" indicates that this file will be overwritten; value "false" indicates that no file will be created. If some other string is specified (like "Copy of "), it will be added to the beginning of the resource title; if there is also a resource with this name, the first free number will be added to the end (like "Copy of Test Script (16)").

Result Attributes

NameTypeDescription
execution timenumbertime interval while the action is executed

Examples

<file:move xmlns:kafka="http://zagreus.com/kafka" from="/source/file/path/source.txt" to="/target/file/path/target.txt"/>
<file:move xmlns:kafka="http://zagreus.com/kafka" from="/source/file/path/source.txt" to-folder="/target/file/path" overwrite="false"/>

file:neof

Tests the file connection for "Not End of File" status.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the file connection

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<file:connection xmlns:kafka="http://zagreus.com/kafka" name="xfile" filename="file/path/sample.txt"/> <z:while xmlns:kafka="http://zagreus.com/kafka"> <z:test-expr> <file:neof connection-name="xfile"/> </z:test-expr> <z:log> <file:readline connection-name="xfile"/> </z:log> </z:while>

file:read

Reads data from a specified location.

Attributes

NameTypePossible ValuesDefault ValueDescription
filenametextdata address
binarybooleanfalseIf true, the resource is handled as a binary file, i.e., the new line characters will not be translated.
encodingtextthe encoding of the input (text) file
headnumberwe can specify to keep only a fixed number of the first lines for text files
tailnumberwe can specify to keep only a fixed number of the last lines for text files
skip-headnumber0we can specify to discard the first specified number of lines for text files. Formerly this attribute was called "skip"
skip-tailnumber0we can specify to discard the last specified number of lines for text files

Result Attributes

NameTypeDescription
bytesnumberit is set when reading binary files, its value is the length of the file
linesnumberit is set when reading text files, its value is the number of lines read
rowcntnumberit is set when reading text files, its value is the number of lines read (so it is the same as "lines")
encodingtextThe used encoding for reading the text file. It can be added by the "encoding" attribute, but it is also overwritten when a BOM is found at the beginning of the file. Choose from this set: ISO-8859-1, ISO-8859-2, UTF-8, UTF-16, UTF-32, UTF-16LE, UTF-16BE, UTF-32LE, UTF-32BE.
foundbomboolenit is true when the read parser found a BOM at the beginning of a text file
filenametextthe relative file name of the actual resource
idtextthe id of the actual resource
sizetextfile size (in bytes)
dirbooleanwhether the actual resource is a folder
typetextthe type of the actual resource
ownertextowner of the file
creationtimedateThe date when the actual resource was created. If it is not available (e.g., on the file system), it will be the last modification time.
createdbytextthe user who created the actual resource (if available)
lastmodtimedatethe date when the actual resource was last modified
contenttypetextthe content type of the actual resource (e.g., "application/octet-stream")
scheduledbooleanwhether the actual resource is scheduled
hiddenbooleanwhether the actual resource is hidden
readablebooleanwhether the actual resource is readable
writablebooleanwhether the actual resource is writable
executablebooleanwhether the actual resource is executable
descriptiontextthe description of the actual resource
lastmodificationtimedatethe date when the actual resource was last modified; same as "lastmodtime"
filecntnumber
foldercntnumber
allfilecntnumber
allfoldercntnumber
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <file:read filename="/groups/public/Tutorial/File/data.txt" binary="false"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <file:read filename="/groups/public/Tutorial/File/data.txt" head="10" binary="false"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> keep only lines 11...30 <file:read filename="/groups/public/Tutorial/File/data.txt" head="20" skip-head="10" binary="false"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> keep only lines 6...15 (counted from the end of file) <file:read filename="/groups/public/Tutorial/File/data.txt" tail="10" skip-tail="5" binary="false"/> </z:log>

file:readline

Reads a line from the specified file connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the file connection

Result Attributes

NameTypeDescription
lengthnumberthe length of the line read
encodingtextThe used encoding for reading the text file. It can be added by the "encoding" attribute, but it is also overwritten when a BOM is found at the beginning of the file. Choose from this set: ISO-8859-1, ISO-8859-2, UTF-8, UTF-16, UTF-32, UTF-16LE, UTF-16BE, UTF-32LE, UTF-32BE
foundbombooleanit is true when the read parser found a BOM at the beginning of a text file
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<file:connection xmlns:kafka="http://zagreus.com/kafka" name="xfile" filename="/groups/public/Tutorial/File/data.txt"/> <z:variable xmlns:kafka="http://zagreus.com/kafka" name="line"/> <z:while xmlns:kafka="http://zagreus.com/kafka"> <z:test-expr> <z:not> <file:eof connection-name="xfile"/> </z:not> </z:test-expr> <z:log> <file:readline connection-name="xfile"/> </z:log> </z:while>

file:split

Writes the lines of the input file into several files, based on the content of their specific columns. It can be used for data validation (checking the number of columns in all rows) by using group-by without value.

Attributes

NameTypePossible ValuesDefault ValueDescription
filename*the name of the input file
folderthe target folder where the resulting file(s) will be written
target-name*The expression of the target filenames. It may contain references to actual column values in the form "\3" (meaning value of 3rd column).
group-byContains a list of column indices (separated by ","s); lines having the same values in all these columns will go to one file. If left empty, then only the check of the number of columns is performed, so attributes "target-name" is ignored.
delimiter;the delimiter of the columns in the file
encodingtextISO-8859-1
ISO-8859-2
UTF-8
UTF-16
UTF-32
UTF-16LE
UTF-16BE
UTF-32LE
UTF-32BE
The used encoding for input and output files.
error-filenameIf specified, lines with the wrong number of columns will be written to this file, regardless of the values the columns specified in the "group-by" attribute. The expected number of columns can be set by either the "expected-header" or the "expected-column-count" attribute
expected-headerA reference header; the number of expected columns will be determined by counting the columns of this attribute value. If "expected-column-count" is also set, both "expected-header" and "expected-column-count" has to be correct otherwise an error will be thrown.
expected-column-countThis attribute can be used to set the number of expected columns. If expected-column-count="from-file", the number of columns will be calculated based on the first line of the input file. If "expected-header" is also set, both "expected-column-count" and "expected-header" has to be correct otherwise an error will be thrown.
input-headerbooleanfalseSpecifies whether the first line of the input file contains a header. If set to true and attribute "expected-header" is set, the two headers must match. See also attribute "include-header".
include-headerbooleanfalseIf set to "true" and there is a header (set either by attribute "expected-header", or found in the first line of the input file when "input-header" is set to true), each output file and the error file will start with this header line.
row-separatorany (meaning either \r, \n or \r\n)
\r
\n
\r\n
anySpecifies the row separator of the source file.

Result Attributes

NameTypeDescription
readlinesnumber
writtenlinesnumber
errorlinesnumber
filestable

Examples

<description xmlns:kafka="http://zagreus.com/kafka">Split /admin/infile.txt based on the 1st and 3rd column value, using # as delimiter</description> <file:split filename="/admin/infile.txt" folder="/admin/outfolder" target-name="out_\1_\3.txt" group-by="1,3" delimiter="#"/>
<description xmlns:kafka="http://zagreus.com/kafka">Check whether all lines have exactly 10 columns; which have more or less go to /admin/outfolder/error.txt</description> <file:split filename="/admin/infile.txt" folder="/admin/outfolder" target-name="out_\8_\10.txt" group-by="8,10" error-filename="error.txt" expected-column-count="10"/>
<description xmlns:kafka="http://zagreus.com/kafka">Check whether all lines have exactly four columns; which have more or less go to /admin/outfolder/error.txt</description> <file:split filename="/admin/infile.txt" folder="/admin/outfolder" target-name="out_\1.txt" group-by="1" error-filename="error.txt" expected-header="COLA;COLB;COLC;COLD"/>
<description xmlns:kafka="http://zagreus.com/kafka">Only performs checking of the number of columns; correct lines (i.e. those with three columns) are not written anywhere</description> <file:split filename="/admin/infile.txt" folder="" group-by="" error-filename="/admin/error.txt" expected-column-count="3"/>
<description xmlns:kafka="http://zagreus.com/kafka">Only performs checking of the number of columns and column count is calculated from the header</description> <file:split filename="/admin/infile.txt" folder="" group-by="" error-filename="/admin/error.txt" expected-column-count="from-file" input-header="true"/>
<description xmlns:kafka="http://zagreus.com/kafka">Treat the first line of the input as header; use this header at the start of each file</description> <file:split filename="/admin/infile.txt" folder="/admin/outfolder" target-name="out_\1_\5.txt" group-by="1,5" error-filename="error.txt" input-header="true" include-header="true"/>
<description xmlns:kafka="http://zagreus.com/kafka">Treat the first line of the input as header; it has to be exactly 'one;two;three;four;five'</description> <file:split filename="/admin/infile.txt" folder="/admin/outfolder" target-name="out_\1_\5.txt" group-by="1,5" error-filename="error.txt" expected-header="one;two;three;four;five" input-header="true" include-header="false"/>

file:write

Writes its contents to a specified file.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the file connection
filename*texttarget location
appendbooleanfalseappend the file or not
encodingtextISO-8859-1
ISO-8859-2
UTF-8
UTF-16
UTF-32
UTF-16LE
UTF-16BE
UTF-32LE
UTF-32BE
UTF-8the encoding to use when writing text mode files
bombooleanfalseif the write action append a BOM according to the encoding attribute, at the beginning of the file

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<file:write xmlns:kafka="http://zagreus.com/kafka" filename="file/path/sample.xls"> <excel:workbook>...</excel:workbook> </file:write>
<excel:workbook xmlns:kafka="http://zagreus.com/kafka" output="file/path/sample.xls">...</excel:workbook>

file:writeline

Writes its contents to a specified location, and writes a newline character.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the file connection
filenametexttarget location
encodingtextISO-8859-1
ISO-8859-2
UTF-8
UTF-16
UTF-32
UTF-16LE
UTF-16BE
UTF-32LE
UTF-32BE
UTF-8the encoding to use when writing text mode files
appendbooleanfalseappend the file or not

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<z:while xmlns:kafka="http://zagreus.com/kafka"> <z:test-expr> <file:neof connection-name="file_conn"/> </z:test-expr> <file:writeline connection-name="" filename="/target/file/path/target.txt" append="true" encoding="UTF-8"> <file:readline connection-name="file_conn"/> </file:writeline> </z:while>

fop:transform

Applies the xsl:fo processor to generate a resource with the the specified type from the source fo file.

Attributes

NameTypePossible ValuesDefault ValueDescription
targettextpcl
pdf
png
ps
rtf
pdfoutput file format
config-filetextpdfThe path of the FOP configuration file, relative to the worker root folder. Default is conf/fop.xconf.

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<fop:transform xmlns:kafka="http://zagreus.com/kafka" output="x.pdf"> <xslt:transform xsl="mstr2fo.xsl"> <mstr:report connection-name="MSTR" id="..."/> </xslt:transform> </fop:transform>

ftp:cd

Changes the actual remote directory. Actions mput and and mget will use this location when relative folder path is given. The name of directory can be relative, in this case the new position will be calculated relative to the old path.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
foldertextname of the folder

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<ftp:cd xmlns:kafka="http://zagreus.com/kafka" connection-name="ftp" folder="pictures"/>

ftp:chgrp

Changes group ownership of a file.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
filenametextname of the file
grouptextchanges the group ownership to this group

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<ftp:connection xmlns:kafka="http://zagreus.com/kafka" name="win2003" server="192.168.1.91" port="1121" user="zagreus" password="zagreus"/> <ftp:chgrp xmlns:kafka="http://zagreus.com/kafka" connection-name="win2003" filename="sample.txt" group="user_2"/>

ftp:chmod

Changes access permissions (rwx) of a file.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
filenametextname of the file
permissionstextpermissions defined by binary references

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<ftp:chmod xmlns:kafka="http://zagreus.com/kafka" connection-name="ftp" filename="file.txt" permissions="644"/>

ftp:chown

Changes the owner of a file.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
filenametextname of the file
usertextchanges the ownership to this user

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<ftp:chown xmlns:kafka="http://zagreus.com/kafka" connection-name="ftp" filename="file.txt" permissions="hostmaster"/>

ftp:close

Closes the FTP connection. All the connections will be closed when execution is finished in the container where the connection is defined, but close action provides a way to close connections manually. The connection is reopened automatically when needed.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<ftp:connection xmlns:kafka="http://zagreus.com/kafka" name="win2003" server="192.168.1.91" port="1121" user="zagreus" password="zagreus" cpassword="" proxy-address="" proxy-port="" proxy-user="" proxy-password="" proxy-cpassword="" proxy-type="" path=""/> <ftp:dir xmlns:kafka="http://zagreus.com/kafka" connection-name="win2003" filename="*.txt" alias="res" _z="1"/> <ftp:close xmlns:kafka="http://zagreus.com/kafka" connection-name="win2003"/>

ftp:connection

Defines an FTP connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextname of the connection
server*textFTP server name or IP address
portnumberport address of the server
usertextuser name if authentication is needed
passwordtextpassword for user authentication
cpasswordtextencrypted password for user authentication
securefalseboolean value for the security protocol of the connection (ftp or sftp)
timeouttimeout value in milliseconds
passivefalseWhether the connection is passive. If true, action will wait “passively” for the server to supply the needed information.
keepalive-timeoutnumberif greater than zero, in every timeout milliseconds an ftp command will be sent to the server to keep alive the connection
proxy-addresstextproxy address
proxy-portnumberproxy port
proxy-usertextproxy server account name
proxy-passwordtextproxy server account password
proxy-cpasswordtextproxy server encrypted account password
proxy-typetextnone
SITE remotehost
USER user
USER proxyuser
USER user proxyuser
USER user
proxy server type
pathtextremote path to open when connecting
encodingtext"ISO-8859-1"Control encoding for the connection. Only for non-secure connections.

Result Attributes

NameTypeDescription
servertextFTP server name or IP address
portnumberport address of the server
usertextuser name if authentication is needed
proxy-usertextproxy server account name
securebooleanboolean value for the security protocol of the connection (ftp or sftp)
passivebooleanwhether the connection is passive
encodingtextcontrol encoding for the connection
execution_timenumberthe length of time the action was executed

Examples

<ftp:connection xmlns:kafka="http://zagreus.com/kafka" name="ftp" server="62.99.218.122" user="zagreus" password="zagreus" path="zagreus"/> <ftp:get xmlns:kafka="http://zagreus.com/kafka" connection-name="ftp" output="x.text" filename="x.text"/>

ftp:delete

Deletes file from the actual remote directory.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
filenametextName of the file to delete. It can contain wildcards.

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<ftp:delete xmlns:kafka="http://zagreus.com/kafka" connection-name="ftp" file="01.jpeg"/>

ftp:dir

Lists the content of the actual remote directory.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
filename*textfilter expression that can contain wildcards
detailsbooleanfalsesets whether to include file details or just filenames
recursivebooleanfalsesets whether display files recursively

Result Attributes

NameTypeDescription
rowcntnumbernumber of rows generated
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription
filenametextthe file name of the actual resource
sizenumberfile size (in bytes)
dirbooleanwhether the actual resource is a folder
ownertextthe owner of the actual resource
lastmodtimetextthe last modification time of the actual resource
linktextwhether the actual resource is a link
permissionstextthe permissions of the actual resource

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <ftp:dir connection-name="win2003" details="true"/> </z:log>
<z:foreach xmlns:kafka="http://zagreus.com/kafka" key="filename"> <z:in> <ftp:dir connection-name="sftpconn" details="false"/> </z:in> <z:log>getting $filename</z:log> <ftp:get connection-name="sftpconn" filename="$filename" output="$filename" binary="true"/> </z:foreach>

ftp:get

Gets a file from the specified FTP connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
filenametextname of the file to get
binarybooleantrueif "true", the resource is handled as a binary file, i.e., the new line characters will not be translated

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<ftp:get xmlns:kafka="http://zagreus.com/kafka" connection-name="ftp" output="x.txt" filename="x.txt" binary="false"/>
<mail:send xmlns:kafka="http://zagreus.com/kafka" connection-name="smtp" from="zagreus@etixpert.com" to="testuser@etixpert.com" subject="x"> <mail:body>Test</mail:body> <mail:attachment filename="attached-filename.pdf"> <ftp:get connection-name="ftp" filename="x.pdf" binary="true"/> </mail:attachment> </mail:send>

ftp:lcd

Changes the actual local directory. Actions mput and mget will use this location when relative folder path is given. The name of directory can be relative, in this case the new position will be calculated relative to the old path.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
foldertextname of the folder

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<ftp:lcd xmlns:kafka="http://zagreus.com/kafka" connection-name="ftp" folder="/admin/smith/pictures"/>

ftp:md

Makes a new folder on the specified ftp server.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
foldertextName of the folder to create. The new folder will be created in the actually selected directory.

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<ftp:md xmlns:kafka="http://zagreus.com/kafka" connection-name="ftp" folder="pictures"/>

ftp:mget

Gets multiple files from the specified FTP connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
fromtextFile names to get. Joker characters ? and * can be used.
totextlocal folder to store the files
binarybooleantrueif "true", the resource is handled as a binary file, i.e., the new line characters will not be translated

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<ftp:mget xmlns:kafka="http://zagreus.com/kafka" connection-name="ftp" from="*.jpeg" to="/user/smith/pictures" binary="yes"/>

ftp:mput

Puts multiple files to the specified FTP connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
fromtextFile names to get. Joker characters ? and * can be used.
totextremote folder to store the files
binarybooleantrueif "true", the resource is handled as a binary file, i.e., the new line characters will not be translated

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<ftp:mput xmlns:kafka="http://zagreus.com/kafka" connection-name="ftp" from="/admin/smith/pictures/*.jpeg" to="pictures" binary="yes"/>

ftp:put

Puts the content to the specified FTP connection. The name of the file in the target system should be specified by the filename attribute.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
filenametextname of the file to put
binarybooleantrueif "true", the resource is handled as a binary file, i.e., the new line characters will not be translated

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<ftp:put xmlns:kafka="http://zagreus.com/kafka" connection-name="ftp"> <file:read filename="x.pdf" binary="true"/> </ftp:put>

ftp:rename

Renames remote file on the specified ftp server.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
fromtextfile path to rename
totextnew name (path) of the file

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<ftp:rename xmlns:kafka="http://zagreus.com/kafka" connection-name="testconn" from="logo.jpg" to="logo1.jpg"/>

http:connection

Defines an HTTP connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextname of the connection
portnumber80port address of the server. If not set, the default is 80 for HTTP and 443 for HTTPs
usertextuser name when authentication is needed
passwordtextpassword for user authentication
cpasswordtextencrypted password for user authentication
proxytextproxy server address
pathtextprefix for all requests
server*textthe http server name or IP address

Result Attributes

NameTypeDescription
servertextthe http server name or IP address
portnumberport address of the server
execution_timenumbertime interval while the action is executed

Examples

<http:connection xmlns:kafka="http://zagreus.com/kafka" name="httpconn" server="62.99.218.122" user="zagreus" password="zagreus" path="zagreus"/> <http:get xmlns:kafka="http://zagreus.com/kafka" connection-name="httpconn" query="README.txt" output="README"/>
<http:get xmlns:kafka="http://zagreus.com/kafka" url="https://www.zagreus.at/downloads/1.5/Zagreus_v1.5.5.0.pdf" output="manual.pdf"/>
<http:connection xmlns:kafka="http://zagreus.com/kafka" name="httpconn" server="https://www.zagreus.at"/> <http:get xmlns:kafka="http://zagreus.com/kafka" connection-name="httpconn" query="downloads/1.5/Zagreus_v1.5.5.0.pdf" output="manual.pdf"/>
<http:connection xmlns:kafka="http://zagreus.com/kafka" name="httpconn" server="www.zagreus.at" port="443" path="downloads/1.5"/> <http:get xmlns:kafka="http://zagreus.com/kafka" connection-name="httpconn" query="Zagreus_v1.5.5.0.pdf" output="manual.pdf"/>
<http:connection xmlns:kafka="http://zagreus.com/kafka" name="httpconn" server="www.google.com" path="search"/> <http:get xmlns:kafka="http://zagreus.com/kafka" connection-name="httpconn" query="?q=etixpert" output="etixpert-results.html"/>
<http:connection xmlns:kafka="http://zagreus.com/kafka" name="httpconn" server="http://www.google.com" path="search?q="/> <http:get xmlns:kafka="http://zagreus.com/kafka" connection-name="httpconn" query="zagreus" output="zagreus-results.html"/>

http:get

Performs a http get request.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
querytextthe query of the request, see the examples.
urltextif filled, this url value overrides all the other attribute settings from http:connection. See the examples.

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<http:connection xmlns:kafka="http://zagreus.com/kafka" name="httpconn" server="62.99.218.122" user="zagreus" password="zagreus" path="zagreus"/> <http:get xmlns:kafka="http://zagreus.com/kafka" connection-name="httpconn" query="README.txt" output="README"/>
<http:get xmlns:kafka="http://zagreus.com/kafka" url="https://www.zagreus.at/downloads/1.5/Zagreus_v1.5.5.0.pdf" output="manual.pdf"/>
<http:connection xmlns:kafka="http://zagreus.com/kafka" name="httpconn" server="https://www.zagreus.at"/> <http:get xmlns:kafka="http://zagreus.com/kafka" connection-name="httpconn" query="downloads/1.5/Zagreus_v1.5.5.0.pdf" output="manual.pdf"/>
<http:connection xmlns:kafka="http://zagreus.com/kafka" name="httpconn" server="www.zagreus.at" port="443" path="downloads/1.5"/> <http:get xmlns:kafka="http://zagreus.com/kafka" connection-name="httpconn" query="Zagreus_v1.5.5.0.pdf" output="manual.pdf"/>
<http:connection xmlns:kafka="http://zagreus.com/kafka" name="httpconn" server="www.google.com" path="search"/> <http:get xmlns:kafka="http://zagreus.com/kafka" connection-name="httpconn" query="?q=etixpert" output="etixpert-results.html"/>
<http:connection xmlns:kafka="http://zagreus.com/kafka" name="httpconn" server="http://www.google.com" path="search?q="/> <http:get xmlns:kafka="http://zagreus.com/kafka" connection-name="httpconn" query="zagreus" output="zagreus-results.html"/>

http:post

Performs a http post request.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
requesttextname of the requested page
urltextif filled, this url value overrides all the other attribute settings from http:connection. See the examples.

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<http:connection xmlns:kafka="http://zagreus.com/kafka" name="http" server="62.99.218.122" user="zagreus" password="zagreus" path="zagreus"/> <http:post xmlns:kafka="http://zagreus.com/kafka" connection-name="http" output="README" request="README"/>

jira:add-attachment

Adds a new attachment to a Jira issue.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
issue-key*textthe key of the issue
filename*textthe name of the attachment on the Jira server
content-typetextapplication/octet-stream
application/pdf
application/zip
image/jpeg
image/gif
image/png
text/html
text/plain
application/pdftype of the file to be attached

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<jira:connection xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net"/> <jira:add-attachment xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" issue-key="ABC-1" filename="attached.pdf" content-type="application/pdf"> <file:read filename="/admin/<-filesystem->/infile.pdf" binary="true"/> </jira:add-attachment>
<jira:connection xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net"/> <jira:add-attachment xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" issue-key="ABC-1" filename="attached.txt" content-type="text/html">attached file text</jira:add-attachment>

jira:add-comment

Adds a new comment to a Jira issue. The text of the comment must be specified as the child text of the action.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
issue-key*textthe key of the issue

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<jira:connection xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net"/> <jira:add-comment xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" issue-key="ABC-1" log="true">who will solve this issue?</jira:add-comment>

jira:attachment

jira:body

jira:call

Calls a Jira REST API function.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*the name of the Jira connection used
api-path*the (relative) API path (e.g. /rest/api/2/project)
http-methodGET
POST
HEAD
PUT
DELETE
PATCH
the HTTP method used (e.g. GET, POST)
content-typetextapplication/json
application/octet-stream
application/pdf
application/zip
image/jpeg
image/gif
image/png
text/html
text/plain
type of the content
result-typezagreus
json
jsonthe return type of the result (if the operation has a result)

Result Attributes

NameTypeDescription
http_response_codethe HTTP response code received from the Jira server

Result Table

NameTypePossible ValuesDescription

Examples

<jira:call xmlns:jira="http://zagreus.com/jira" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" connection-name="con" api-path="/rest/api/2/project" result-type="zagreus" log="true"/>
<jira:call xmlns:jira="http://zagreus.com/jira" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" connection-name="con" api-path="/rest/api/2/user/assignable/search" result-type="json" log="true"> <jira:request-param name="project" value="ASD"/> </jira:call>

jira:connection

Defines a Jira connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
name*textname of the connection
url*textURL of the Jira installation
token*textthe authentication token. If it is an API token, the format is: "mailaddress:token" BASE64-encoded. For Personal Access Token, specify the token itself
patbooleantruewhether the token is a Personal Access Token. For Server installations, it needs to be set to true, otherwise, for Cloud installation set it to false
custom-date-formattextyyyy-MM-dd'T'HH:mm:ss.SSSXthis attribute can override the default Jira date format

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<jira:connection xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net"/>

jira:create-issue

Creates a new Jira issue.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
type*textthe type of the issue (e.g. "Task", "Bug", "Story"). It can be case insensitive, and must be defined for the specified project
title*textthe title text of the issue
assignee-idtextthe ID of the user who the issue will be assigned to. Use action jira:list-users to get this user ID
reporter-idtextthe ID of the user who reports the issue. Use action jira:list-users to get this user ID. If not specified, the user who belongs to the token will be used
status-nametextthe name of the status (or column) of the issue (e.g. "TO DO", "In progress"). It can be case insensitive, and must be defined for the specified project
prioritynumberthe priority of the issue. For most of the installations, values 1 to 5 are valid (1 = Highest, 5 = Lowest). If not specified, value=3 will be used on server side

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<jira:create-issue xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" project-name="Sample Jira Project" type="bug" title="NEW BUG!" assignee-id="6***********5" reporter-id="12********ff" status-name="in progress" priority="1"> Detailed issue description </jira:create-issue>

jira:delete-comment

Deletes a comment from a Jira issue.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
issue-key*textthe key of the issue
comment-id*textthe ID of the comment

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<jira:delete-comment xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" issue-key="ABC-1" comment-id="12345"/>

jira:delete-issue

Deletes a Jira issue.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
issue-key*textthe key of the issue

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<jira:delete-issue xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" issue-key="ABC-1"/>

jira:filter-issues

Retrieves information about Jira issues, specified by a Jira Query Language (JQL) filter. See "https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/" and "https://support.atlassian.com/jira-service-management-cloud/docs/advanced-search-reference-jql-fields/" for reference about JQL queries.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
jql*textthe JQL filter
contentbooleanfalseif set, the content of the issue is also retrieved
only-keysbooleanfalseif set, only the keys of the issues will be returned in a list. This setting also overrides the "content" attribute

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
idtextthe ID of the issue
keytextthe key of the issue
titletextthe title of the issue
typetextthe type of the issue
project-idtextthe ID of the project which the issue belongs to
project-keytextthe key of the project which the issue belongs to
project-nametextthe name of the project which the issue belongs to
prioritytextthe priority of the issue (usually a number between 1 and 5)
priority-nametextthe priority name of the issue (e.g. "Highest")
status-nametextthe status (or column) name of the issue (e.g. "In Progress")
assignee-idtextthe user ID of the user who this issue is assigned to
assignee-nametextthe display name of the user who this issue is assigned to (e.g. "John Smith")
assignee-emailtextthe e-mail address of the user who this issue is assigned to. Due to GDPR restrictions affecting the Jira installations, this might not be visible (depending on the actual setting of the user)
reporter-idtextthe user ID of the user who reported this issue
reporter-nametextthe display name of the user who reported this issue (e.g. "Jane Doe")
reporter-emailtextthe e-mail address of the user who reported this issue. Due to GDPR restrictions affecting the Jira installations, this might not be visible (depending on the actual setting of the user)
creation-timetextthe time when the issue was created
modification-timetextthe time when the issue was last modified
contenttextthe content (i.e. description) of the issue

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:jira="http://zagreus.com/jira">returns all issues for a specific project</z:log> <jira:filter-issues xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" jql="project='ABC'" content="true" only-keys="false" log="true"/>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:jira="http://zagreus.com/jira">returns all issue keys which have attachment(s) and one of the comments contains the text 'finished'</z:log> <jira:filter-issues xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" jql="project='ABC' and attachments IS NOT EMPTY AND comment ~ 'finished'" only-keys="true" log="true"/>

jira:get-issue

Retrieves information about a Jira issue.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
issue-key*textthe key of the issue
contentbooleantrueif set, the content of the issue is also retrieved

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
idtextthe ID of the issue
keytextthe key of the issue
titletextthe title of the issue
typetextthe type of the issue
project-idtextthe ID of the project which the issue belongs to
project-keytextthe key of the project which the issue belongs to
project-nametextthe name of the project which the issue belongs to
prioritytextthe priority of the issue (usually a number between 1 and 5)
priority-nametextthe priority name of the issue (e.g. "Highest")
status-nametextthe status (or column) name of the issue (e.g. "In Progress")
assignee-idtextthe user ID of the user who this issue is assigned to
assignee-nametextthe display name of the user who this issue is assigned to (e.g. "John Smith")
assignee-emailtextthe e-mail address of the user who this issue is assigned to. Due to GDPR restrictions affecting the Jira installations, this might not be visible (depending on the actual setting of the user)
reporter-idtextthe user ID of the user who reported this issue
reporter-nametextthe display name of the user who reported this issue (e.g. "Jane Doe")
reporter-emailtextthe e-mail address of the user who reported this issue. Due to GDPR restrictions affecting the Jira installations, this might not be visible (depending on the actual setting of the user)
creation-timetextthe time when the issue was created
modification-timetextthe time when the issue was last modified
contenttextthe content (i.e. description) of the issue
attachmentstablethe attachments of the issue. Each attachment is described by the following fields: "filename", "size", "content-type" and "link"; the content can be downloaded using the provided link

Examples

<jira:get-issue xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" issue-key="ABC-1" content="true" log="true"/>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:jira="http://zagreus.com/jira">change priority to higher</z:log> <jira:get-issue xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" issue-key="ABC-1" content="false" alias="temp"/> <z:variable xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:jira="http://zagreus.com/jira" name="priority">${number(iss.priority)}</z:variable> <z:if xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:jira="http://zagreus.com/jira" test-expr="priority > 1"> <z:then>${priority := priority - 1}</z:then> </z:if> <jira:update-issue xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" issue-key="ABC-1" priority="$priority"/>

jira:list-attachments

Lists the attachments of a given issue.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
issue-key*textthe key of the issue

Result Attributes

NameTypeDescription
rowcntnumberthe number of comments retrieved
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
filenametextthe filename of the attachment
sizenumberthe file size of the attachment (in bytes)
content-typetextthe content type of the attachment (e.g. application/pdf)
linktextthe download link of the attachment

Examples

<jira:list-attachments xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" issue-key="ABC-123" log="true"/>

jira:list-comments

Lists the comments of a given issue.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
issue-key*textthe key of the issue

Result Attributes

NameTypeDescription
rowcntnumberthe number of comments retrieved
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
idtextthe ID of the comment
contenttextthe content (i.e. text) of the comment
creation-timetextthe time when the comment was created
modification-timetextthe time when the comment was last modified
author-idtextthe user ID of the user who is the author of this comment
author-nametextthe display name of the user who is the author of this comment (e.g. "John Smith")
author-emailtextthe e-mail address of the user who is the author of this comment. Due to GDPR restrictions affecting the Jira installations, this might not be visible (depending on the actual setting of the user)

Examples

<jira:list-comments xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" issue-key="ABC-123" log="true"/>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:jira="http://zagreus.com/jira">show the comment of a specific user</z:log> <z:filter xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:jira="http://zagreus.com/jira" key="s" where-expr="s.'author-id'='60*****50'" log="true"> <jira:list-comments connection-name="con" issue-key="ABC-123"/> </z:filter>

jira:list-projects

Lists the projects available on a given Jira installation.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection

Result Attributes

NameTypeDescription
rowcntnumberthe number of comments retrieved
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
idtextthe ID of the project
keytextthe key of the project
nametextthe name of the project

Examples

<jira:list-projects xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" log="true"/>

jira:list-users

Lists the users associated with a given project.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection

Result Attributes

NameTypeDescription
rowcntnumberthe number of comments retrieved
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
idtextthe user ID of the user
nametextthe display name of the user (e.g. "John Smith")
emailtextthe e-mail address of the user. Due to GDPR restrictions affecting the Jira installations, this might not be visible (depending on the actual setting of the user)
activebooleanwhether the user is active
typetextthe type of the user (e.g. "atlassian")

Examples

<jira:list-users xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" project-key="ABC" log="true"/>

jira:request-param

Refers to a parameter of the jira:call action

Attributes

NameTypePossible ValuesDefault ValueDescription
name*name of the parameter
valuevalue of the parameter. Does not have to be URL-encoded

Examples

<jira:call xmlns:jira="http://zagreus.com/jira" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" connection-name="con" api-path="/rest/api/2/user/assignable/search" result-type="json" log="true"> <jira:request-param name="project" value="ASD"/> </jira:call>

jira:update-comment

Updates an existing comment in a Jira issue. The text of the comment must be specified as the child text of the action.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
issue-key*textthe key of the issue
comment-id*textthe ID of the comment to be updated
appendbooleanfalseif set to true, the content will be appended to the end of the original message

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<jira:connection xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" name="con" token="cG**********ZCQQ==" url="https://sample.atlassian.net"/> <jira:update-comment xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" issue-key="ABC-1" comment-id="12345">now we know who will solve this issue!</jira:update-comment>

jira:update-issue

Edits an existing Jira issue.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the connection
issue-key*textthe key of the issue
typetextthe new type of the issue (e.g. "Task", "Bug", "Story"). It can be case insensitive, and must be defined for the specified project
titletextthe new title text of the issue
assignee-idtextthe ID of the user who the issue will be assigned to. Use action jira:list-users to get this user ID
status-nametextthe name of the new status (or column) of the issue (e.g. "TO DO", "In progress"). It can be case insensitive, and must be defined for the specified project
prioritynumberthe new priority of the issue. For most of the installations, values 1 to 5 are valid (1 = Highest, 5 = Lowest). If not specified, value=3 will be used on server side

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:jira="http://zagreus.com/jira">changing the issue status and assigning it to another user</z:log> <jira:update-issue xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" issue-key="ABC-1" type="bug" assignee-id="6***********5"/>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:jira="http://zagreus.com/jira">changing the description</z:log> <jira:update-issue xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" issue-key="ABC-1"> Detailed issue description </jira:update-issue>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:jira="http://zagreus.com/jira">setting priority to "Highest"</z:log> <jira:update-issue xmlns:jira="http://zagreus.com/jira" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" connection-name="con" issue-key="ABC-1" priority="1"/>

json:add-element

Inserts an element (a JSON, or a Zagreus type of boolean, null, number or text) into a JSON array (JSON element with type of array), specified by the content of the action. The result will be the JSON after this insertion. Some json types: array: ["element1", "element2"] object: {"keystring" : "string value", "keynumber" : 1234} For further details check JSON specification: https://www.json.org/json-en.html

Attributes

NameTypePossible ValuesDefault ValueDescription
parent-path*the path of the parent JSON element; the specified element will be inserted under this parent element. The path must start from the root, and can contain numbers (to access specified elements of the JSON array) and other texts (to refer to the key of a specific JSON element). "/" refers to the root element Note: the parent (target of inserting) must be a JSON element with the type of array.
indexnumberthe end of the listthe index of the element to insert. Indexing starts with 1. If attribute 'index' is set and there is already a value on that index the original value will be overwritten. If the defined 'index' value is greater than the last index of the array NULL values will be inserted to the empty indexes.
element*the JSON element (or a boolean, null, number or text) to insert

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <file:read filename="jsonelement.txt" binary="false" alias="jsonelement"/> <json:add-element parent-path="/first/3/second" index="1" element="$jsonelement"> <file:read filename="jsonexample.txt" binary="false"/> </json:add-element> </z:log>
<file:read xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json" filename="jsonexample.txt" binary="false" alias="srcjson"/> <file:read xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json" filename="jsonelement.txt" binary="false" alias="jsonelement"/> <z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <json:add-element parent-path="/first/3/second" element="$jsonelement" index="5"> ${srcjson} </json:add-element> </z:log>
<json:create xmlns:json="http://zagreus.com/json" xmlns:kafka="http://zagreus.com/kafka" alias="jsonelement"> <file:dir path="/actuser/<-filesystem->" filename="*.txt" details="true" recursive="true"/> </json:create> <file:read xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json" filename="jsonexample.txt" binary="false" alias="srcjson"/> <z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <json:add-element parent-path="/first/3/second" index="" element="$jsonelement"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <z:variable name="newelement">${true}</z:variable> <json:add-element parent-path="/first/3/second" index="1" element="$newelement"> <file:read filename="jsonexample.txt" binary="false"/> </json:add-element> </z:log>

json:add-property

Adds a property (a JSON, or a Zagreus type of boolean, null, number or text) into a JSON object, specified by the content of the action. The result will be the JSON after this insertion

Attributes

NameTypePossible ValuesDefault ValueDescription
parent-path*the path of the parent JSON element; the specified element will be inserted under this parent element. The path must start from the root, and can contain numbers (to access specified elements of the JSON array) and other texts (to refer to the key of a specific JSON element). "/" refers to the root element
name*the property name for insert
value*the JSON element (or a boolean, null, number or text) to insert

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <file:read filename="jsonelement.txt" binary="false" alias="jsonelement"/> <json:add-property parent-path="/first/3/second" name="samplename" value="$jsonelement"> <file:read filename="jsonexample.txt" binary="false"/> </json:add-property> </z:log>
<file:read xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json" filename="jsonexample.txt" binary="false" alias="srcjson"/> <file:read xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json" filename="jsonelement.txt" binary="false" alias="jsonelement"/> <z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <json:add-property parent-path="/first/3/second" name="samplename" value="$jsonelement"> ${srcjson} </json:add-property> </z:log>
<json:create xmlns:json="http://zagreus.com/json" xmlns:kafka="http://zagreus.com/kafka" alias="jsonelement"> <file:dir path="/actuser/<-filesystem->" filename="*.txt" details="true" recursive="true"/> </json:create> <file:read xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json" filename="jsonexample.txt" binary="false" alias="srcjson"/> <z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <json:add-property parent-path="/first/3/second" name="samplename" value="$jsonelement"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <z:variable name="newelement">${true}</z:variable> <json:add-element parent-path="/first/3/second" name="samplename" value="$newelement"> <file:read filename="jsonexample.txt" binary="false"/> </json:add-element> </z:log>

json:create

Creates the JSON representation of a Zagreus variable.

Attributes

NameTypePossible ValuesDefault ValueDescription

Result Attributes

NameTypeDescription
rowcntnumberthe number of lines in the result; it is set when the result is of type list.

Result Table

NameTypePossible ValuesDescription

Examples

<json:create xmlns:json="http://zagreus.com/json" xmlns:kafka="http://zagreus.com/kafka" _x="14" _y="28" _w="547" _h="255" _o="1" _v="0" _z="1" alias="result" _s="false"> <z:array alias="alias_name" _z="0" _o="1.1" _x="22" _y="18" _w="515" _h="183" _v="0"> <z:alias name="x" _x="10" _y="0" _w="171" _h="124" _z="0" _o="1.1.1" _v="0">1</z:alias> <z:alias name="y" _x="222" _y="2" _w="171" _h="124" _z="1" _o="1.1.2" _v="0">2</z:alias> </z:array> </json:create> <z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json" level="" null-format="null" _o="2" _x="582" _y="34" _w="239" _h="259" _v="0" _z="0" _s="false">----------- $result</z:log>
<json:create xmlns:json="http://zagreus.com/json" xmlns:kafka="http://zagreus.com/kafka" output="json.txt"> <file:dir path="/admin/tempfolder" filename="*.txt" details="true" recursive="true"/> </json:create>

json:get

Gets a list element or a property from a JSON definition, specified by the content of the action. The result will be the JSON text of this property / element

Attributes

NameTypePossible ValuesDefault ValueDescription

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <json:get keyword="schema"> <file:read filename="jsonexample.txt" binary="false"/> </json:get> </z:log>
<file:read xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json" filename="jsonexample.txt" binary="false" alias="srcjson"/> <z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <json:get path="/first/3/second">$srcjson</json:get> </z:log>

json:parse

Parses the content json into a Zagreus variable. The result, depending on the JSON object used as input, can be list, record, number or text

Attributes

NameTypePossible ValuesDefault ValueDescription

Result Attributes

NameTypeDescription
rowcntnumberthe number of lines in the result; it is set when the result is of type list.

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <file:read filename="jsonexample.txt" alias="jsoncontent"/> <json:parse alias="zagreusvariable">$jsoncontent</json:parse> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <json:parse alias="zagreusvariable"> <file:read filename="jsonexample.txt" alias="jsoncontent"/> </json:parse> </z:log>

json:process-element

Parses an element of the content json into a Zagreus variable. The result, depending on the JSON object used as input, can be list, record, number or text

Attributes

NameTypePossible ValuesDefault ValueDescription
text-outputbooleanfalsewhether the result should be the JSON text of the specified element (true) or a Zagreus variable (false)

Result Attributes

NameTypeDescription
rowcntnumberthe number of lines in the result; it is set when the result is of type list.

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <json:process-element keyword="schema" text-output="true"> <file:read filename="jsonexample.txt" binary="false"/> </json:process-element> </z:log>
<file:read xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json" filename="jsonexample.txt" binary="false" alias="srcjson"/> <z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <json:process-element path="/" text-output="false">$srcjson</json:process-element> </z:log>
<file:read xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json" filename="jsonexample.txt" binary="false" alias="srcjson"/> <z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <json:process-element path="/first/3/second" text-output="true" output="jsonelement.txt">$srcjson</json:process-element> </z:log>

json:remove

Removes a list element or a property from a JSON definition, specified by the content of the action. The result will be the source JSON text without the specified property / element

Attributes

NameTypePossible ValuesDefault ValueDescription

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <json:remove keyword="schema"> <file:read filename="jsonexample.txt" binary="false"/> </json:remove> </z:log>
<file:read xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json" filename="jsonexample.txt" binary="false" alias="srcjson"/> <z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json"> <json:remove path="/first/3/second">$srcjson</json:remove> </z:log>

kafka:connection

Defines a Kafka connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
name*textname of the connection
server*textthe Kafka server name
port*number9092port address of the server
server-cluster*textThe Kafka server cluster. Entries have to take the form host:port, separated by commas.

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<kafka:connection xmlns:kafka="http://zagreus.com/kafka" name="kafkaconnection" server="sample.kafka.host" port="9092"/>
<kafka:connection xmlns:kafka="http://zagreus.com/kafka" name="kafkaconnection" server-cluster="sample.kafka.server:9092,sample.kafka.server:9093,sample.kafka.server:9094"/>

kafka:consume

Consumes one or all of the new messages.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the Kafka connection used
consumer-group*textthe name of the consumer group
topic*textthe topic from which the message(s) will be consumed
only-nextbooleanfalseIf set to true, only one message will be consumed. If set to false, all the new messages will be consumed from the given topic.
message-typetextstring
number
record
date
time
binarydata
stringThe message-type is applied for deserialization of the message.

Result Attributes

NameTypeDescription
rowcntnumberthe number of messages consumed
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
partitionnumber
offsetnumber
messagetext
message-keytext

Examples

<kafka:connection xmlns:kafka="http://zagreus.com/kafka" name="kafkaconnection" host="kafka.sample.host" port="9092"/> <kafka:consume xmlns:kafka="http://zagreus.com/kafka" connection-name="kafkaconnection" consumer-group="testgroup" topic="testtopic" only-next="true" alias="x"/> <z:log xmlns:kafka="http://zagreus.com/kafka">${x.message}</z:log>
<kafka:connection xmlns:kafka="http://zagreus.com/kafka" name="kafkaconnection" host="kafka.sample.host" port="9092"/> <z:foreach xmlns:kafka="http://zagreus.com/kafka" key="j"> <z:in> <kafka:consume connection-name="kafkaconnection" consumer-group="testgroup" topic="testtopic" only-next="false"/> </z:in> <z:log>Actual result: Message-key: ${j.message_key} Message: ${j.message}</z:log> </z:foreach>
<kafka:connection xmlns:kafka="http://zagreus.com/kafka" name="kafkaconnection" host="kafka.sample.host" port="9092"/> <z:while xmlns:kafka="http://zagreus.com/kafka" test-expr="true"> <kafka:consume connection-name="kafkaconnection" consumer-group="testgroup" topic="testtopic" only-next="true" alias="consume_result"/> <z:break test-expr="length(consume_result)=0"/> <z:log>Actual result: Message-key: ${consume_result[1].message_key} Message: ${consume_result[1].message}</z:log> </z:while>

kafka:list-topics

List the topics of the Kafka connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the Kafka connection used
consumer-grouptextthe name of the consumer group
detailsbooleanfalseIf false, the returning result is a simple list of the topic names. Otherwise it is a table with details of the topics. Each partition is a separate line in the result.

Result Attributes

NameTypeDescription
rowcntnumberthe number of topics or partitions listed
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
topictext
partitionnumber
leader_hosttext
leader_idtext
leader_id_strtext
leader_insync_hoststext
leader_insync_idstext
offsetnumber

Examples

<kafka:connection xmlns:kafka="http://zagreus.com/kafka" name="kafkaconnection" host="sample.kafka.host" port="9092"/> <z:log xmlns:kafka="http://zagreus.com/kafka"> <kafka:list-topics connection-name="kafkaconnection" consumer-group="testgroup" details="true"/> </z:log>

kafka:produce

Produces a new message.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textthe name of the Kafka connection used
client-idtextzagreus_producerthe client id of the producer
topic*textthe topic which the message will be produced to
message-keytextA random generated GUID for equally distribution among the brokers.The message key for the produced message. If not specified, a round robin algorithm will be applied.
message-typetextstring
number
record
date
time
binarydata
stringThe message-type is applied for serialization of the message.

Result Attributes

NameTypeDescription
partitionnumberthe partition of the produced message
offsetnumberthe offset of the produced message
topictextthe topic which the message was produced to
execution_timenumbertime interval while the action is executed

Examples

<kafka:connection xmlns:kafka="http://zagreus.com/kafka" name="kafkaconnection" host="kafka.sample.host" port="9092"/> <kafka:produce xmlns:kafka="http://zagreus.com/kafka" connection-name="kafkaconnection" client-id="sample-client" topic="sample-topic" message-key="produce" message-type="string">sample message text </kafka:produce>
<kafka:connection xmlns:kafka="http://zagreus.com/kafka" name="kafkaconnection" host="kafka.sample.host" port="9092"/> <z:for xmlns:kafka="http://zagreus.com/kafka" loop-counter="i" from="1" to="10" step="1"> <kafka:produce connection-name="kafkaconnection" client-id="sample-client" topic="sample-topic" message-key="loop_key_$i" message-type="string" result-attributes="produce_result_attributes">This is a message with loop counter $i </kafka:produce> <z:log>Produce result attributes: partition: ${produce_result_attributes.partition} offset: ${produce_result_attributes.offset} topic: ${produce_result_attributes.topic} </z:log> </z:for>

kafka:seek

Sets the cursor position (offset) for the Kafka partition.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the Kafka connection used
consumer-group*textthe name of the consumer group
topic*textthe topic which contain the target partitions
partition*number/textthe target partition(s); can also be "all"
offset*number/textthe target offset; can also be "begin" and "end"

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<kafka:connection xmlns:kafka="http://zagreus.com/kafka" name="kafkaconnection" host="sample.kafka.host" port="9092"/> <kafka:seek xmlns:kafka="http://zagreus.com/kafka" connection-name="kafkaconnection" consumer-group="testgroup" topic="sample-topic" partition="all" offset="begin"/>
<kafka:connection xmlns:kafka="http://zagreus.com/kafka" name="kafkaconnection" host="sample.kafka.host" port="9092"/> <kafka:produce xmlns:kafka="http://zagreus.com/kafka" connection-name="kafkaconnection" client-id="sample-client" topic="sample-topic" message-key="key_0" message-type="string" result-attributes="produce_result_attributes">sample message text</kafka:produce> <z:log xmlns:kafka="http://zagreus.com/kafka"> <kafka:consume connection-name="kafkaconnection" consumer-group="testgroup" topic="sample-topic" only-next="false" alias="consume_result" message-type="string"/> </z:log> <kafka:seek xmlns:kafka="http://zagreus.com/kafka" connection-name="kafkaconnection" consumer-group="testgroup" topic="sample-topic" partition="${produce_result_attributes.partition}" offset="${produce_result_attributes.offset}"/> <z:log xmlns:kafka="http://zagreus.com/kafka"> <kafka:consume connection-name="kafkaconnection" consumer-group="testgroup" topic="sample-topic" only-next="false" alias="consume_result" message-type="string"/> </z:log>

ldap:connection

Defines an LDAP connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
name*textname of the connection
server*textLDAP server name or IP address
portnumber389port address of the server
user-dntextuser name for authentication (ignored, if authentication-mode is set to "none")
passwordtextpassword for user authentication
cpasswordtextencrypted password for user authentication
protocoltextldap
ldaps
ldapthe protocol used
authentication-methodtextnone
simple
nonethe method of authentication for the LDAP server
base-dntexta suffix of the distinguished name used in other LDAP actions; the base-dn will be concatenated to the appropriate attributes (e.g. user-dn, filter), separated by a comma

Result Attributes

NameTypeDescription
servertextthe http server name or IP address
protocoltextthe protocol used
execution_timenumberTime interval while the action is executed.

Examples

<ldap:connection xmlns:ldap="http://zagreus.com/ldap" xmlns:kafka="http://zagreus.com/kafka" name="testldapconn" server="ldap.sampleserver.com" port="389" protocol="ldap" authentication-method="none"/> <z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:ldap="http://zagreus.com/ldap"> <ldap:test connection-name="testldapconn" user-dn="uid=john,ou=company,dc=ldap,dc=sampleserver,dc=com" password="passwd"/> </z:log>
<ldap:connection xmlns:ldap="http://zagreus.com/ldap" xmlns:kafka="http://zagreus.com/kafka" name="testldapconn" server="ldap.sampleserver.com" port="636" user-dn="uid=admin,ou=company,dc=ldap,dc=sampleserver,dc=com" password="adminpasswd" protocol="ldaps" authentication-method="simple"/> <z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:ldap="http://zagreus.com/ldap"> <ldap:test connection-name="testldapconn" user-dn="uid=john,ou=company,dc=ldap,dc=sampleserver,dc=com" password="passwd"/> </z:log>
<ldap:connection xmlns:ldap="http://zagreus.com/ldap" xmlns:kafka="http://zagreus.com/kafka" name="testldapconn" server="ldap.sampleserver.com" port="389" protocol="ldap" authentication-method="none" base-dn="dc=ldap,dc=sampleserver,dc=com"/> <z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:ldap="http://zagreus.com/ldap"> <ldap:test connection-name="testldapconn" user-dn="uid=john,ou=company" password="passwd"/> </z:log>

ldap:search

Performs an LDAP search.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the LDAP connection used
node-filter*the node filter for the LDAP search
object-filter*the object filter for the LDAP search
detailsbooleanfalsewhether to list only the found accout common names or also all the details
attribute-namesa comma-separated list of the columns in the result
scopesubtree
object
one-level
subtreethe scope of the result

Result Attributes

NameTypeDescription
rowcntnumberNumber of the returned records.
execution_timenumberTime interval while the action is executed.

Result Table

NameTypePossible ValuesDescription

Examples

<ldap:connection xmlns:ldap="http://zagreus.com/ldap" xmlns:kafka="http://zagreus.com/kafka" name="my-ldap-connection" server="my.ldap.server.com" port="389" user-dn="cn=my-user,dc=my,dc=ldap,dc=server,dc=com" password="my-password" cpassword="" protocol="ldap" authentication-method="simple"/> <ldap:search xmlns:ldap="http://zagreus.com/ldap" xmlns:kafka="http://zagreus.com/kafka" connection-name="my-ldap-connection" node-filter="ou=my-organiztaion,dc=my,dc=ldap,dc=server,dc=com" object-filter="uid=target-user" details="true" log="true"/>
<ldap:connection xmlns:ldap="http://zagreus.com/ldap" xmlns:kafka="http://zagreus.com/kafka" name="my-ldap-connection" server="my.ldap.server.com" port="389" user-dn="cn=my-user,dc=my,dc=ldap,dc=server,dc=com" password="my-password" cpassword="" protocol="ldap" authentication-method="simple"/> <ldap:search xmlns:ldap="http://zagreus.com/ldap" xmlns:kafka="http://zagreus.com/kafka" connection-name="my-ldap-connection" node-filter="ou=my-organiztaion,dc=my,dc=ldap,dc=server,dc=com" object-filter="ou=target-child-org-unit" details="true" log="true"/>

ldap:test

Test authenticating into a given LDAP server.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname of the LDAP connection used
user-dn*textthe user distinguished name
passwordtextpassword for user authentication
cpasswordtextencrypted password for user authentication

Result Attributes

NameTypeDescription
execution_timenumberTime interval while the action is executed.

Result Table

NameTypePossible ValuesDescription

Examples

<ldap:connection xmlns:ldap="http://zagreus.com/ldap" xmlns:kafka="http://zagreus.com/kafka" name="testldapconn" server="ldap.sampleserver.com" port="389" protocol="ldap" authentication-method="none"/> <z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:ldap="http://zagreus.com/ldap"> <ldap:test connection-name="testldapconn" user-dn="uid=john,ou=company,dc=ldap,dc=sampleserver,dc=com" password="passwd"/> </z:log>
<ldap:connection xmlns:ldap="http://zagreus.com/ldap" xmlns:kafka="http://zagreus.com/kafka" name="testldapconn" server="ldap.sampleserver.com" port="389" protocol="ldap" authentication-method="none" base-dn="dc=ldap,dc=sampleserver,dc=com"/> <z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:ldap="http://zagreus.com/ldap"> <ldap:test connection-name="testldapconn" user-dn="uid=john,ou=company" password="passwd"/> </z:log>

mail:attachment

Specifies an attachment part for the send action.

Attributes

NameTypePossible ValuesDefault ValueDescription
content-typetextapplication/octet-stream
application/pdf
application/zip
image/jpeg
image/gif
image/png
text/html
text/plain
type of the file to be attached
filenametextpath of the file to be attached
inlineauto
true
false
autowhether the attachment is inline (e.g. image displayed in the mail body). When set to "auto", images are set to inline

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
content-typetextType of the attached file.
filenametextFile path of the attachment.
inlinetextWhether the attachment is inline (e.g. image displayed in the mail body). When set to "auto", images are set to inline

Examples

<mail:send xmlns:kafka="http://zagreus.com/kafka" connection-name="mail" to="zagreus@etixpert.com" from="zagreus@etixpert.com" subject="test"> <mail:body>Sample message</mail:body> <mail:attachment content-type="application/pdf" filename="report.pdf"> <mstr:document connection-name="demo8" id="5C03D3F0402C7CB835E053A9388BB557"/> </mail:attachment> </mail:send>

mail:body

Specifies the body part for the send action.

Attributes

NameTypePossible ValuesDefault ValueDescription
content-typetexttext/plain
text/html
Type of the file to be attached

Examples

<mail:send xmlns:kafka="http://zagreus.com/kafka" connection-name="mail" to="zagreus@etixpert.com" from="zagreus@etixpert.com" subject="test"> <mail:body content-type="text/html"> <file:read filename="source.html"/> </mail:body> </mail:send>

mail:close

Closes the mail connection. All the connections will be closed when execution is finished in the container where the connection is defined, but close action provides a way to close connections manually. The connection is reopened automatically when needed.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection

Result Attributes

NameTypeDescription
execution_timenumberTime interval while the action is executed.

Examples

<mail:connection xmlns:kafka="http://zagreus.com/kafka" name="imap_demouser" server="mail.server.com" port="143" user="demouser@domain.com" password="1234" cpassword="" secure="false" tls="false" protocol="imap"/> <z:log xmlns:kafka="http://zagreus.com/kafka" level=""> <mail:getinfo connection-name="imap_demouser" folder="INBOX"/> </z:log> <mail:close xmlns:kafka="http://zagreus.com/kafka" connection-name="imap_demouser"/>

mail:connection

Defines a mail connection. Additional properties can be defined in the mail:property child action(s).

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextname of the connection
server*textserver name or IP address
portnumberport address of the server
usertextuser name for the smtp server, if authentication is needed
passwordtextpassword for user authentication
cpasswordtextencrypted password for user authentication
securebooleanfalseIf "true", ssl (Secure Socket Layer) will be used for communication. Server certification must be added to keystore.
tlsfalseIf "true", TLS (Transport Layer Security) will be used for communication. Server certification must be added to keystore.
mail-debugfalseIf "true", the debug output will be written into the file "log/mailDebug.log" in the Worker module's root folder.
protocolsmtp
pop3
imap
the used protocol

Result Attributes

NameTypeDescription
servertextserver name or IP address
portnumberport address of the server
usertextuser name when authentication is needed
protocoltextthe used protocol
securetextssl (Secure Socket Layer) is used for communication
tlsboolean
execution_timenumberTime interval while the action is executed.

Examples

<mail:connection xmlns:kafka="http://zagreus.com/kafka" name="http" server="smtp.etixpert.com" user="zagreus" password="zagreus"/> <mail:send xmlns:kafka="http://zagreus.com/kafka" connection-name="mail" to="zagreus@etixpert.com" from="zagreus@etixpert.com" subject="test"> <mail:body>Sample mail message</mail:body> </mail:send>
<mail:connection xmlns:kafka="http://zagreus.com/kafka" name="http" server="smtp.etixpert.com" user="zagreus" password="zagreus"> <mail:property name="mail.imap.auth.plain.disable" value="true"/> <mail:property name="mail.imaps.auth.plain.disable" value="true"/> </mail:connection>

mail:getinfo

Gets informations about a folder. This action differs from "get-msg" only that there will be no messages fetched, only the result attributes will be set.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname to identify the defined connection
foldertextINBOXThe folder name where from the messages should be fetched. Default value is 'INBOX', and this is the only possible value when using POP3-based connection.

Result Attributes

NameTypeDescription
messagenumbernumber of all messages
readnumbernumber of read messages
unreadnumbernumber of unread messages
execution_timenumberTime interval while the action is executed.

Examples

<z:include xmlns:kafka="http://zagreus.com/kafka" _a="POP3 - Email Server" filename="id:402881480ef1ccba010f051990ae000b" _c="filename:/groups/public/Tutorial/Connections/POP3 - Email Server"/> <mail:getinfo xmlns:kafka="http://zagreus.com/kafka" connection-name="pop3" folder="INBOX"/> <z:log xmlns:kafka="http://zagreus.com/kafka">$mail_getinfo</z:log>

mail:getmsg

Gets mail messages.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname to identify the defined connection
foldertextINBOXThe folder name where from the messages should be fetched. Default value is "INBOX", and this is the only possible value when using POP3-based connection.
fromtext1The index of the first message to fetch. The oldest message has index 1, the second oldest has index 2, and so on. The newest message can also be accessible with using index -1, the second newest with index -2, and so on.
totextthe index of the last message to fetch
idxtextThe index of the message to fetch. When specifying this attribute, it sets the attributes "from" and "to" to the specified value.
message-idtextthe message-id of the message to fetch
deletebooleanfalseif "true", the fetched messages will be deleted from the folder
message-filtertextread
unread
all
allspecifies which type of messages should pass the filtering
move-totextemptyThe name of the folder where the messages should be copied into. Default value is empty, in this case the messages will not be copied.
fetch-contentbooleantrueif "false", only the message headers will be processed, message body and attachments are not
headerbooleanfalseif "true", the full header will be returned in the field "header"

Result Attributes

NameTypeDescription
messagenumbernumber of messages queried
readnumbernumber of messages read
unreadnumbernumber of messages unread
rowcntnumbernumber of rows generated
execution_timenumberTime interval while the action is executed.

Examples

<z:foreach xmlns:kafka="http://zagreus.com/kafka" key="mail"> <z:in> <mail:get-msg connection-name="pop3" from-idx="1" to-idx="2" erase="true"/> </z:in> <z:log>from=${mail.from}, to=${mail.to}, subject=${mail.subject}, body=${ mail.body}</z:log> <z:if test-expr="mail.attachments"> <z:then> <z:foreach key="x"> <z:in>${mail.attachments}</z:in> <z:log>name=${x.name}, content-type=${x.content_type}</z:log> <z:block output="${x.name}">${x.content}</z:block> </z:foreach> </z:then> </z:if> </z:foreach>

mail:property

Specifies one or more property for a mail connection. Besides the attributes, textual list can be used to specify the properties in the standard name=value syntax.

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextname of the property
valuetextvalue of the property

Examples

<mail:connection xmlns:kafka="http://zagreus.com/kafka" name="http" server="smtp.etixpert.com" user="zagreus" password="zagreus"> <mail:property name="mail.imap.auth.plain.disable" value="true"/> <mail:property name="mail.imaps.auth.plain.disable" value="true"/> </mail:connection>
<mail:connection xmlns:kafka="http://zagreus.com/kafka" name="http" server="smtp.etixpert.com" user="zagreus" password="zagreus"> <mail:property> mail.imap.auth.plain.disable=true mail.imaps.auth.plain.disable=true </mail:property> </mail:connection>

mail:send

Sends a mail message. The address fields can contain more than one address by using comma as separator character. If the content of these fields is not a simple text, but an iterable expression instead (list or record), a comma separated list is created from the expression.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*textname to identidy the defined connection
from*textfrom field of the message
from-display-nametextdisplay name for the from field of the message
to*textto field of the message
cctextcc field of the message
bcctextbcc field of the message
reply-totextreply-to field of the message
reply-to-display-nametextdisplay name for the reply-to field of the message
subjecttextsubject of the message
multipartbooleantrueif set to true, all parts (body, attachments, inline attachments) are packed into a multipart container; otherwise body is handled as a plain-text part. When set to "false" attachments are not applied. When "mail:body" is missing or empty the mail is sent as plain text regardless of this setting.

Result Attributes

NameTypeDescription
execution_timenumberTime interval while the action is executed.

Examples

<mail:send xmlns:kafka="http://zagreus.com/kafka" connection-name="mail" to="zagreus@etixpert.com, john.smith@nowhere.com" from="zagreus@etixpert.com" subject="test"> <mail:body>Sample mail message</mail:body> </mail:send>
<mail:send xmlns:kafka="http://zagreus.com/kafka" connection-name="smtp-demouser" from="zagreus@etixpert.com" to="john.smith@nowhere.com" subject="Embedded image test"> <mail:body content-type="text/html"> <html> <body> <b>start embedded image (gif)</b> <br> <img src="cid:image.gif"> <br> <b>end embedded image</b> <br> </img> </body> </html> </mail:body> <mail:attachment filename="image.gif" content-type="image/gif"> <file:read filename="/admin/image.gif" binary="true"/> </mail:attachment> </mail:send>

mdx:discover

Executes an MDX discover action. It may also contain mdx:restriction elements to restrict the result.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
output-typetexttable
xml
tablethe format of the output
cubetextname of the cube (optional)
commandtextthe actual discover command

Result Attributes

NameTypeDescription
rowcntnumberthe number of rows returned (if output-type is "table")

Examples

<mdx:discover xmlns:kafka="http://zagreus.com/kafka" connection-name="xmlaconn" cube="" output-type="table" command="MDSCHEMA_LEVELS"> <mdx:restriction name="DIMENSION_UNIQUE_NAME" value="[Dim Promotion]"/> </mdx:discover>

mdx:execute

Executes an MDX execute action.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the connection
output-typetexttable
xml
tablethe format of the output

Result Attributes

NameTypeDescription
rowcntnumberthe number of rows returned (if output-type is "table")

Examples

<mdx:execute xmlns:kafka="http://zagreus.com/kafka" connection-name="xmlaconn" output-type="table"> SELECT [Measures].members ON columns FROM Sales WHERE ([Time].[1997]) </mdx:execute>

mdx:restriction

Defines a restriction criterion for the mdx:discover action.

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextthe name of the restriction
valuetextthe value of the restriction

Examples

<mdx:discover xmlns:kafka="http://zagreus.com/kafka" connection-name="xmlaconn" cube="" output-type="table" command="MDSCHEMA_LEVELS"> <mdx:restriction name="DIMENSION_UNIQUE_NAME" value="[Dim Promotion]"/> </mdx:discover>

mdx:xmla-connection

Defines an XMLA connection for the MDX actions.

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextthe name of the connection
urltextthe URL of the connection
providertextthe provider of the connection (e.g. "MSOLAP", "Mondrian", etc.)
datasourcetextthe datasource (e.g. "local", "MondrianFoodMart", etc.)
catalogtextthe catalog of the connection
usertextthe user of the connection
passwordtextthe password of the connection
cpasswordtextthe encrypted password of the connection

Examples

<mdx:xmla-connection xmlns:kafka="http://zagreus.com/kafka" name="xmlams" url="http://win2003:80/olap/msmdpump.dll" provider="MSOLAP" datasource="local" catalog="Adventure Works DW" user="administrator" password="" cpassword=""/>

misc:plink

misc:psexec

misc:psservice

misc:remote-psexec-connection

msft:connection

Defines a Microsoft connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
name*name of the connection
authority*the authority of the connection
client-id*the client ID of the connection
client-secret*the client secret of the connection
scopethe scope of the connection
mailbox-user-namethe user name of the mailbox. It can be also set in the actual mail action

Examples

<msft:connection xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" name="msft" authority="https://login.microsoftonline.com/example.onmicrosoft.com/" client-id="26bd****-****-****-****-********2bac" client-secret="Nc******************************Wh"/> <msft:download-file xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" site-name="Communication site" drive-name="Zagreus" folder-path="/etixpert" file-name="sample_file.pdf" output="/admin/<-filesystem->/sample_file_downloaded.pdf"/>

msft:copy-mail

Copies a mail to another location.

Attributes

NameTypePossible ValuesDefault ValueDescription
mailbox-user-namethe user name of the mailbox. If not set, it will be read from the connection
message-id*the message id to copy

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<msft:connection xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" name="msft" authority="https://login.microsoftonline.com/example.onmicrosoft.com/" client-id="26bd****-****-****-****-********2bac" client-secret="Nc******************************Wh"/> <msft:copy-mail xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" mailbox-user-name="example@example.onmicrosoft.com" message-id="AAMkADY2..." target-folder-path="custom folder/subfolder"/>

msft:delete-item

Deletes a resource item.

Attributes

NameTypePossible ValuesDefault ValueDescription
item-id*id of the item to delete

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<msft:delete-item xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" site-name="Communication site" drive-name="Sample drive" item-id="013HPRADM35I7UAN5NWVGLIAMT4XB2HQDG"/>

msft:delete-mail

Deletes a mail from the mailbox.

Attributes

NameTypePossible ValuesDefault ValueDescription
mailbox-user-namethe user name of the mailbox. If not set, it will be read from the connection
message-id*the message id to delete

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<msft:connection xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" name="msft" authority="https://login.microsoftonline.com/example.onmicrosoft.com/" client-id="26bd****-****-****-****-********2bac" client-secret="Nc******************************Wh"/> <msft:delete-mail xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" mailbox-user-name="example@example.onmicrosoft.com" message-id="AAMkADY2..."/>

msft:download-file

Downloads a file from a folder.

Attributes

NameTypePossible ValuesDefault ValueDescription
folder-path*path of the folder to download the file from
file-name*the filename of the file on the Sharepoint drive

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<msft:download-file xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" site-name="Communication site" drive-name="Zagreus" folder-path="/etixpert" file-name="file_to_download.pdf" output="/admin/<-filesystem->/msft/asd.pdf"/>

msft:get-access-token

Obtains an access token which can be re-used.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the Microsoft Sharepoint connection used

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<msft:connection xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" name="msft" authority="https://login.microsoftonline.com/example.onmicrosoft.com/" client-id="26bd****-****-****-****-********2bac" client-secret="Nc******************************Wh" mailbox-user-name="example@example.onmicrosoft.com"/> <msft:get-access-token xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" alias="msft_access_token"/> <msft:list-sites xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" access-token="$msft_access_token" log="true"/>

msft:get-mail

Gets one mail message.

Attributes

NameTypePossible ValuesDefault ValueDescription
mailbox-user-namethe user name of the mailbox. If not set, it will be read from the connection
message-id*the message id to get
attachmentsbooleanfalsewhether download the attached files as well
attachments-target-pathif set, all attachments will be saved into this folder

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription
id
internet_message_id
subject
sender_address
sender_name
from_address
from_name
to_recipients_address
to_recipients_name
cc_recipients_address
cc_recipients_name
bcc_recipients_address
bcc_recipients_name
reply_to_recipients_address
reply_to_recipients_name
parent_folder_id
draftboolean
readboolean
has_attachmentsboolean
body_content
body_content_type
body_preview
sent_date_time
received_date_time

Examples

<msft:connection xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" name="msft" authority="https://login.microsoftonline.com/example.onmicrosoft.com/" client-id="26bd****-****-****-****-********2bac" client-secret="Nc******************************Wh"/> <msft:get-mail xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" mailbox-user-name="example@example.onmicrosoft.com" message-id="AAMkADY2..." attachments="true" attachments-target-path="/admin/<-filesystem->/msft"/>
<msft:connection xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" name="msft" authority="https://login.microsoftonline.com/example.onmicrosoft.com/" client-id="26bd****-****-****-****-********2bac" client-secret="Nc******************************Wh" mailbox-user-name="example@example.onmicrosoft.com"/> <msft:get-mail xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" message-id="AAMkADY2..." output="/admin/<-filesystem->/out.txt"/>

msft:list-drives

Lists the drives.

Attributes

NameTypePossible ValuesDefault ValueDescription

Result Attributes

NameTypeDescription
rowcntnumberthe number of resources listed
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription
id
name

Examples

<msft:list-drives xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" site-id="12******-****-****-****-**********7e"/>
<msft:list-drives xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" site-name="Communication site"/>

msft:list-folder

Lists the contents of a folder.

Attributes

NameTypePossible ValuesDefault ValueDescription
folder-path*path of the folder to list

Result Attributes

NameTypeDescription
rowcntnumberthe number of resources listed
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription
id
name
type

Examples

<msft:list-folder xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" site-name="Communication site" drive-name="Sample drive" folder-path="/folder" log="true"/>

msft:list-mail-folders

Lists mail folders.

Attributes

NameTypePossible ValuesDefault ValueDescription
mailbox-user-namethe user name of the mailbox. If not set, it will be read from the connection
folder-idif set, only the specified folder info is returned
folder-pathif set, only the specified folder info is returned
parent-folder-idif set, only mail folders in the specified folder id will be listed
parent-folder-pathif set, only mail folders in the specified folder path will be listed

Result Attributes

NameTypeDescription
rowcntnumberthe number of resources listed
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription
id
name
parent_folder_id
child_folder_countnumber
unread_item_countnumber
total_item_countnumber
child_folder_countnumber
sizenumber

Examples

<msft:list-mail-folders xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" mailbox-user-name="etixpert@etixpertgmbh.onmicrosoft.com" folder-path="Hidden Folder/Nested Folder" log="true"/>
<msft:connection xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" name="msft" authority="https://login.microsoftonline.com/example.onmicrosoft.com/" client-id="26bd****-****-****-****-********2bac" client-secret="Nc******************************Wh" mailbox-user-name="example@example.onmicrosoft.com"/> <msft:list-mail-folders xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" parent-folder-path="Hidden Folder" log="true"/>

msft:list-mails

Lists mail messages.

Attributes

NameTypePossible ValuesDefault ValueDescription
mailbox-user-namethe user name of the mailbox. If not set, it will be read from the connection
parent-folder-idif set, only mails in the specified folder id will be listed
parent-folder-pathif set, only mails in the specified folder path will be listed
topnumberthe limit of the number of messages to fetch
skipnumberthe number of messages to skip when fetching
selectid
internetMessageId
subject
sender
replyTo
from
isRead
isDraft
hasAttachments
receivedDateTime
sentDateTime
body
bodyPreview
toRecipients
ccRecipients
bccRecipients
parentFolderId
if set, we retrieve only the listed fields from the messages. The delimiter is ","
fromif set, this filter will be applied to the "from" field of the messages. The filter works by checking if the field contains the attribute value
bodyif set, this filter will be applied to the body field of the messages. Only works for text-format message bodies, HTML bodies are not supported. The filter works by checking if the field contains the attribute value
subjectif set, this filter will be applied to the subject field of the messages. The filter works by checking if the field contains the attribute value
filter-typeand
or
andif multiple filters (i.e. "from", "body" and "subject") are set, this field controls the logical operation between the filter parts
only-unreadbooleantruewhether to fetch only unread mails or all mails
api-pathfor paging the results, use this attribute to retrieve the next page of mail results. The value should be the previous action 'nextlink' result attribute.

Result Attributes

NameTypeDescription
nextlinkThe next link that can be used for paging the results. Only filled when there are no filters applied in the action. Use it for the next list-mails action 'api-path' attribute.
rowcntnumberthe number of resources listed
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription
id
internet_message_id
subject
sender_address
sender_name
from_address
from_name
to_recipients_address
to_recipients_name
cc_recipients_address
cc_recipients_name
bcc_recipients_address
bcc_recipients_name
reply_to_recipients_address
reply_to_recipients_name
parent_folder_id
draftboolean
readboolean
has_attachmentsboolean
body_content
body_content_type
body_preview
sent_date_time
received_date_time

Examples

<msft:list-mails xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" top="10" mailbox-user-name="example@example.onmicrosoft.com" select="subject,sender,isRead,hasAttachments" only-unread="true" from="Smith" subject="important" filter-type="or" alias="x"/>

msft:list-sites

Lists the sites.

Attributes

NameTypePossible ValuesDefault ValueDescription

Result Attributes

NameTypeDescription
rowcntnumberthe number of resources listed
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription
id
name

Examples

<msft:list-sites xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" log="true"/>

msft:move-mail

Moves a mail to another location.

Attributes

NameTypePossible ValuesDefault ValueDescription
mailbox-user-namethe user name of the mailbox. If not set, it will be read from the connection
message-id*the message id to move

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<msft:connection xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" name="msft" authority="https://login.microsoftonline.com/example.onmicrosoft.com/" client-id="26bd****-****-****-****-********2bac" client-secret="Nc******************************Wh"/> <msft:move-mail xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" mailbox-user-name="example@example.onmicrosoft.com" message-id="AAMkADY2..." target-folder-path="custom folder/subfolder"/>

msft:upload-file

Uploads a file to a folder.

Attributes

NameTypePossible ValuesDefault ValueDescription
folder-path*path of the folder to upload the file to
file-name*the filename of the new file uploaded on the Sharepoint drive
content-typeapplication/octet-stream
application/pdf
application/zip
image/jpeg
image/gif
image/png
text/html
text/plain
application/pdfthe content type of the file
overwritebooleanfalsewhether overwrite the file (if exists)

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<msft:upload-file xmlns:msft="http://zagreus.com/msft" xmlns:kafka="http://zagreus.com/kafka" connection-name="msft" site-name="Communication site" drive-name="Zagreus" folder-path="/etixpert" file-name="target_name.pdf" content-type="application/pdf"> <file:read filename="/admin/<-filesystem->/msft/sample.pdf" binary="true"/> </msft:upload-file>

mstr:attribute-form

Refers to a display form of an attribute

Attributes

NameTypePossible ValuesDefault ValueDescription

Examples

<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="6533FDE9447AA3BBEC5161BCA5BFECC6"> <mstr:axis name="column"> <mstr:attribute id="8D679D5211D3E4981000E787EC6DE8A4"/> <mstr:attribute name="Region"> <mstr:attribute-form name="ID"/> <mstr:attribute-form id="8D6790D211D3E4981000E787EC6DE8A4"/> </mstr:attribute> </mstr:axis> </mstr:report>

mstr:attribute

Refers to an attribute which can be put on a certain axis.

Attributes

NameTypePossible ValuesDefault ValueDescription

Examples

<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="6533FDE9447AA3BBEC5161BCA5BFECC6"> <mstr:axis name="column"> <mstr:attribute id="8D679D5211D3E4981000E787EC6DE8A4"/> <mstr:attribute name="Region"> <mstr:attribute-form name="ID"/> <mstr:attribute-form id="8D6790D211D3E4981000E787EC6DE8A4"/> </mstr:attribute> </mstr:axis> </mstr:report>

mstr:axis

Defines an axis for a report or export. An axis can contain attributes and one metrics element (which also may contain metric elements). If an axis is undefined, it will remain in the state it was, except that attributes and the metrics element which are defined on other axes will be moved there. If the metrics element is not defined on any axis, it will remain on its original one as the last element.

Attributes

NameTypePossible ValuesDefault ValueDescription

Examples

<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="6533FDE9447AA3BBEC5161BCA5BFECC6"> <mstr:axis name="pageby"/> <!-- delete everything from the pages axis --> <mstr:axis name="row"> <!-- put two attributes to the rows --> <mstr:attribute name="Region"/> <mstr:attribute name="Country"> <mstr:attribute-form name="DESC"/> <mstr:attribute-form name="ID"/> </mstr:attribute> </mstr:axis> <!-- put one attribute and the metrics to the columns --> <mstr:axis name="columns"> <mstr:attribute name="Category"/> <mstr:metrics> <mstr:metric name="Revenue"/> <mstr:metric name="Profit"/> </mstr:metrics> </mstr:axis> </mstr:report>

mstr:cache

Performs cache actions. Currently it is supported only for the type "cube"

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
actioninvalidate
delete
load
unload
invalidatethe action to perform on the cache

Result Attributes

NameTypeDescription
msgidtextmessage id
jobidtextjob id
usertextuser name
projecttextname of project
sessionidtextsession id
rowcntnumberthe number of cache entries listed
execution_timethe length of time the action was executed

Examples

<mstr:cache xmlns:kafka="http://zagreus.com/kafka" connection-name="mstrconnection" cache-id="" cache-name="SAMPLE_CACHE" action="invalidate"/>

mstr:cachelist

Lists the actual cache entries on the MSTR server.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
typereport
document
cube
reportthe type of cache to list
detailsbooleantruewhether to include details or not
current-projectbooleantruewhether to list cache entries for the current project only

Result Attributes

NameTypeDescription
msgidtextmessage id
jobidtextjob id
usertextuser name
project-nametextparent project name
sessionidtextsession id
rowcntnumberthe number of cache entries listed
filter_detailstextfilter details
execution_timetime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
idthe id of the cache
source-idthe id of the source report or document
source-namethe name of the source report or document
typethe type of the cache
project-namethe name of the project
statusthe status of the cache
creatorthe ID of the creator of the cache entry
creatornamethe name of the creator of the cache entry
hitsthe number of hits of the actual cache entry (numeric)
sizethe size of the actual cache entry in kB (numeric)
creationtimethe time of creation
expirethe time of expiration
lasthittimethe time of last hit
lastupdatetimethe time of last update
localethe locale of the cache entry
datalocalethe locale of the data (only when detals = true)
filenamecache file name (only when detals = true)
lastloadtimelast load date of cache (only when detals = true)
waitinglist(only when detals = true)

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:cachelist connection-name="mstr" details="false"/> </z:log>

mstr:cancel

Cancels the execution of one or more MicroStrategy jobs.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
job-id*the job IDs to cancel, separated by ;s

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:cancel connection-name="demo8" job-id="5625;5682"/> </z:log>

mstr:close

Closes the MSTR connection. All the connections will be closed when execution is finished in the container where the connection is defined, but close action provides a way to close connections manually. The connection is reopened automatically when needed.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used

Examples

<z:include xmlns:kafka="http://zagreus.com/kafka" _a="MSTR_titan" filename="/groups/public/Tutorial/Connections/MSTR - Demoserver" _c="filename:/users/zagreus_test/connections/MSTR_titan"/> <z:log xmlns:kafka="http://zagreus.com/kafka" level=""> <mstr:cachelist connection-name="MicroStrategy Tutorial" details="true" current-project="true"/> </z:log> <mstr:close xmlns:kafka="http://zagreus.com/kafka" connection-name="MicroStrategy Tutorial"/>

mstr:connection

Defines an MSTR connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
name*name of the connection
server*MSTR intelligence server name or IP address
portnumber34952port address of the server
user*user name for authentication
passwordpassword for user authentication
cpasswordencrypted password for user authentication
projectMicrostrategy Tutorialproject name to use
project-idproject ID to use
pathdefault path for the resources
cachebooleanfalsedefault cache setting, can be overrided
locale1030 = da_DK
1031 = de_DE
1043 = nl_NL
3082 = es_ES
1033 = en_US
2057 = en_GB
1049 = ru_RU
1045 = pl_PL
1036 = fr_FR
4108 = fr_CH
2060 = fr_BE
1040 = it_IT
2064 = it_CH
1041 = ja_JP
1042 = ko_KR
1046 = pt_BR
1053 = sv_SE
2052 = zh_CN
1028 = zh_TW
default locale ID. We also support Java-style locale strings, e.g. "en_US" or "en-US". For a list of possible locale numbers supported by MicroStrategy, please see https://community.microstrategy.com/s/article/KB6423-The-complete-list-of-Locale-IDs-for-MicroStrategy-Developer?language=en_US
request-timeoutnumbertimeout value for requests
server-busy-timeoutnumberServer busy timeout value
page-by-timeoutnumberthe default page-by timeout, can be overrided
authenticationstandard
ldap
database
standardthe type of authentication
encodingthe default character encoding type of the returned xml
sslbooleanfalseIf set to "true", the connection will be established with SSL. The proper certification needs to be installed in the worker-side trusted store.
connect-nowbooleanfalseIf set to "true", this action does not only defines the connection, but also connects to the server immediately. In this case the result of the action will be the session ID.

Result Attributes

NameTypeDescription
nametextname of the connection
servertextconnected server
portnumberconnection port
usertextuser name who makes the connection
projecttextconnected project
authorizationtextauthorization protocol
sslbooleanssl is used or not
encodingtextconnection encoding
execution_timenumbertime interval while the action is executed

Examples

<mstr:connection xmlns:kafka="http://zagreus.com/kafka" name="demo8" server="62.99.218.122" user="administrator" project="Microstrategy Tutorial"/> <mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="mstr" output="x.xml" id="6533FDE9447AA3BBEC5161BCA5BFECC6"/>

mstr:copy

Copies a report to another folder or title.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
titlethe title of the new report
typeAggMetric
Attribute
AttributeForm
Catalog
CatalogDefn
Column
Configuration
Consolidation
ConsolidationElement
Datamart
DatamartReport
DBConnection
DBLogin
DBMS
DBRole
DbTable
Dimension
DocumentDefinition
DrillMap
Fact
FactGroup
Filter
Folder
Format
Function
FunctionPackageDefinition
Generic
Link
Locale
MDSecurityFilter
Metric
Monitor
Project
Prompt
PromptAnswer
PromptAnswers
PropertySet
ReportDefinition
Request
Reserved
ReservedLastOne
Resolution
Role
ScheduleEvent
ScheduleObject
ScheduleTrigger
Schema
Script
Search
SearchFolder
SecurityRole
ServerDef
Shortcut
Style
SubscriptionDevice
Table
TableSource
Template
Unknown
User
ReportDefinitionthe type of the report to copy

Result Attributes

NameTypeDescription
idtextreport id of the new report
msgidtext??????
nametextname of the new report
jobidtext??????
usertextusername who performed the copy action
projecttextproject name where the copy action executed
usertextusername who performed the copy action
sessionidtextsession id
rowcntnumber????????
filter_detailstext????????????
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<mstr:copy xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" id="6533FDE9447AA3BBEC5161BCA5BFECC6" folder-id="33E1DF484FBDB78C2AC3A7BB4B77D257" title="CopyofReport"/>

mstr:create

Creates a new MSTR resource (currently only Folder type is supported).

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
title*the title of the new resource
typeFolder
Folderthe type of the new resource; currently only Folder is implemented
descriptionthe description of the new resource

Result Attributes

NameTypeDescription
msgidtextmessage id
jobidtextjob id
usertextusername who performed the create action
projecttextthe number of cache entries listed
sessionidtextthe number of cache entries listed
rowcntnumbernumber of returned rows
filter_detailstextfilter details
idtextid of new resource
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<mstr:create xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" folder-id="33E1DF484FBDB78C2AC3A7BB4B77D257" title="new folder" type="Folder" description="An example folder"/>

mstr:databaseconnectionlist

Lists the actual database connections of the MSTR server. It can be filtered by inserting mstr:filter actions into it; its "variable" attribute has to be set to the appropriate result attribute of the mstr:databaseconnectionlist action, the "operator" attribute has to be "in", "between", "=", "<", "<=", ">" and ">=", and the "value" attribute has to contain the value used for filtering. Multiple values can be used if separated by ";"s. All filter conditions will be applied at the same time (i.e. they are AND-ed).

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
sort-fieldwe can sort the results using the name of a result attribute
sort-orderascending
descending
ascendingthe order during sorting

Result Attributes

NameTypeDescription
msgidtextmessage id
jobidtextjob id
usertextusername who performed the create action
projecttextthe number of cache entries listed
sessionidtextthe number of cache entries listed
rowcntnumbernumber of returned rows
filter_detailstextfilter details
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
idthe id of the database connection
namethe name of the database connection
numbernumberthe number of the database connection
instancenamethe database instance name
statusnumberthe status of the database connection
statusnamethe status name of the database connection
loginnamethe database login name
servernamethe name of the server
usernamethe user name of the database connection

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:databaseconnectionlist connection-name="mstr" sort-field="id" sort-order="descending"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:databaseconnectionlist connection-name="mstr"> <mstr:filter variable="username" operator="=" value="JohnSmith"/> </mstr:databaseconnectionlist> </z:log>

mstr:delete

Deletes a resource.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
typeAggMetric
Attribute
AttributeForm
Catalog
CatalogDefn
Column
Configuration
Consolidation
ConsolidationElement
Datamart
DatamartReport
DBConnection
DBLogin
DBMS
DBRole
DbTable
Dimension
DocumentDefinition
DrillMap
Fact
FactGroup
Filter
Folder
Format
Function
FunctionPackageDefinition
Generic
Link
Locale
MDSecurityFilter
Metric
Monitor
Project
Prompt
PromptAnswer
PromptAnswers
PropertySet
ReportDefinition
Request
Reserved
ReservedLastOne
Resolution
Role
ScheduleEvent
ScheduleObject
ScheduleTrigger
Schema
Script
Search
SearchFolder
SecurityRole
ServerDef
Shortcut
Style
SubscriptionDevice
Table
TableSource
Template
Unknown
User
ReportDefinitionthe type of the resource to delete

Examples

<mstr:delete xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" id="6533FDE9447AA3BBEC5161BCA5BFECC6" type="Folder"/>

mstr:dir

Lists the contents of a folder, or an user group.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
detailsbooleanfalsewhether to list only the resource names or also all the details
recursivebooleanfalsespecifies recursive listing
distinctbooleanfalsespecifies whether each object is returned only once (e.g. users can be present in several user groups). If set to true, from elements appearing multiple times, either the children of the "root" are kept, or those with the longest path
typeAggMetric
Attribute
AttributeAbstract
AttributeForm
AttributeRole
AttributeTransformation
Catalog
CatalogDefn
Column
Configuration
Consolidation
ConsolidationElement
CustomGroup
DBConnection
DBLogin
DBMS
DBRole
DBTable
DBTablePMT
Datamart
DatamartReport
DbTable
Dimension
DimensionOrdered
DimensionSystem
DimensionUser
DimensionUserHierarchy
DocumentDefinition
DrillMap
Fact
FactGroup
Filter
Folder
FormNormal
FormSystem
Format
Function
FunctionPackageDefinition
InBox
InBoxMsg
Link
Locale
MDSecurityFilter
Metric
MetricDMX
Monitor
MonitorDBConnections
MonitorJobs
MonitorPerformance
MonitorUserConnections
Project
Prompt
PromptAnswer
PromptAnswerBigDecimal
PromptAnswerBoolean
PromptAnswerDate
PromptAnswerDimty
PromptAnswerDouble
PromptAnswerElements
PromptAnswerExpression
PromptAnswerExpressionDraft
PromptAnswerLong
PromptAnswerObjects
PromptAnswerString
PromptAnswers
PromptBigDecimal
PromptBoolean
PromptDate
PromptDimty
PromptDouble
PromptElements
PromptExpression
PromptExpressionDraft
PromptLong
PromptObjects
PromptString
PropertyGroup
PropertySet
ReportBase
ReportCube
ReportDatamart
ReportDefinition
ReportEngine
ReportGraph
ReportGrid
ReportGridAndGraph
ReportIncrementalRefresh
ReportNonInteractive
ReportText
ReportTransaction
ReportWritingDocument
Request
Resolution
Role
RoleTransformation
ScheduleEvent
ScheduleObject
ScheduleTrigger
Schema
Script
Search
SearchFolder
SecurityRole
ServerDef
Shortcut
Style
SubscriptionDevice
SubtotalDefinition
SystemSubtotal
Table
TablePartitionMD
TablePartitionWH
TableSource
Template
User
UserGroup
ReportDefinitionFilter for resources based on subtype or type. If empty, will list all resources. If a type and a subtype has the same name (e.g. User), will choose subtype.

Result Attributes

NameTypeDescription
rowcntnumberthe number of MSTR resources listed

Result Table

NameTypePossible ValuesDescription
id
displayname
name
type
subtype
typenumnumber
subtypenumnumber
abbreviation
path
ownername
owner
ownerid
parentid
parentname
parentdisplayname
hiddenboolean
creationtimedate
lastmodtimedate
description
statenumber
datasources
flagsnumber

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:dir connection-name="demo8" id="6533FDE9447AA3BBEC5161BCA5BFECC6" details="false" recursive="true"/> </z:log>
<mstr:dir xmlns:kafka="http://zagreus.com/kafka" connection-name="example" name="/User groups/MicroStrategy Desktop Analyst/International Users" alias="userslist" details="true"/>
<mstr:dir xmlns:kafka="http://zagreus.com/kafka" connection-name="example" name="/User groups" alias="grouplist" details="false" type="UserGroup"/>
<mstr:dir xmlns:kafka="http://zagreus.com/kafka" connection-name="example" name="/User groups" alias="grouplist" details="true" recursive="true" unique="true" type="User"/>

mstr:document

Gets an MSTR document or dossier in pdf or Office 2000 Excel format.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
formatpdf
excel
mstr
xml
pdfthe format the result will be saved in
asyncbooleanfalseif set to true, the action returns immediately, without waiting for the execution of the document
cachebooleantrueif set, the execution will use the caching feature
historybooleanfalseif set, the report will be inserted into the history list
page-by-timeoutnumberTimeout value for page generation. Overrides value specified in the connection.
layoutsSets the layouts for export; can be separated by ";", "all" means all possible layouts in separate files (i.e. in a Zagreus list), while "all-in-one" means that all possible layouts should be exported in one file. "all-in-one" is currently supported for Excel and PDF.
embed-fontsbooleantrue
false
documentsetting
documentsettingif set to "true", the used fonts will be embedded in the generated PDF. If set to "false", the fonts will not be embedded. By leaving this attribute empty or entering "documentsetting", the setting of the document will be used.

Result Attributes

NameTypeDescription
iddocument id of the document requested
msgidmessage id of the document requested
namename of the document requested
userlogin name of the connected user
projectproject name where the document is located
errorMSTR error code when an error occurs
errorMessageMSTR error message when an error occurs
jobidthe job id; when multiple documents were executed (e.g. page-bys), their job ids are separated by ;
childreportjobidthe job id(s) of the child report(s); when multiple documents were executed (e.g. page-bys), their job ids are separated by ;

Examples

<mstr:document xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.pdf" id="5C03D3F0402C7CB835E053A9388BB557"> <mstr:page-by-selection> <mstr:page-by title="Category" value="Electronics"/> <mstr:page-by title="Subcategory" value="Cameras"/> </mstr:page-by-selection> </mstr:document>

mstr:dossier

Gets an MSTR dossier in PDF or Excel format.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
formatpdf
excel
mstr
xml
pdfthe format the result will be saved in
asyncbooleanfalseif set to true, the action returns immediately, without waiting for the execution of the dossier
cachebooleantrueif set, the execution will use the caching feature
historybooleanfalseif set, the report will be inserted into the history list
page-by-timeoutnumberTimeout value for page generation. Overrides value specified in the connection.
orientationportrait
landscape
portraitthe orientation of the pdf file
paper-widthnumberthe paper width of the pdf file
paper-heightnumberthe paper height of the pdf file
paper-typeletter
legal
ledger
executive
folio
statement
A3
A4
A5
B4
B5
the paper type of the pdf file
measurement-unitcm
in
mm
pt
pc
cmthe measurement unit for the attributes paper-width and paper-height when exporting to pdf
rangepage
chapter
dossier
dossierthe export range when exporting to pdf
detail-levelfullpage
visualization
both
fullpagethe detail level when exporting to pdf
show-filterno
page
chapter
both
chapterfilter display options when exporting to pdf. Only applicable for MSTR level 11.2 or above
grid-settingsscale
extend-cols
extend-cols-repeat
scalespecific grid settings (scaling to page width, extend columns over pages with or without repeating attribute columns) when exporting to pdf. Only applicable for MSTR level 11.2 or above
headerbooleandossier defaultif set, the exported PDF dossier will show the header on every page
footerbooleandossier defaultif set, the exported PDF dossier will show the footer (typically page numbers) on every page
embed-fontsbooleantrue
false
dossiersetting
dossiersettingif set to "true", the used fonts will be embedded in the generated PDF. If set to "false", the fonts will not be embedded. By leaving this attribute empty or entering "dossiersetting", the setting of the dossier will be used.

Result Attributes

NameTypeDescription
idresource id of the dossier requested
msgidmessage id of the dossier requested
namename of the dossier requested
userlogin name of the connected user
projectproject name where the document is located
errorMSTR error code when an error occurs
errorMessageMSTR error message when an error occurs
jobidthe job id; when multiple documents were executed (e.g. page-bys), their job ids are separated by ;
childreportjobidthe job id(s) of the child report(s); when multiple dossiers were executed (e.g. page-bys), their job ids are separated by ;

Examples

<mstr:dossier xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.pdf" id="5C03D3F0402C7CB835E053A9388BB557"> <mstr:page-by-selection> <mstr:page-by title="Category" value="Electronics"/> <mstr:page-by title="Subcategory" value="Cameras"/> </mstr:page-by-selection> </mstr:dossier>

mstr:excel

Gets an MSTR report in Office 2000 Excel format.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
subscription-idID of the subscription to use. If the report is also specified, it is required that the subscription belongs to the given report
cachebooleantrueif set, the execution will use the caching feature
update-cachebooleantrueif set, the execution will modify the cache
historybooleanfalseif set to true target report - set by "id" or "name" attributes - will be added to history list
page-by-requiredbooleanfalseif set, the result attribute page_by will be set
filter-details-requiredbooleanfalseif set, the result attribute filter_details will be set
expand-all-pagesbooleanfalseif set, all pages will be exported
export-filter-detailsbooleanfalseif set, filter details will be exported
export-headers-as-textbooleanfalseif set, the headers will be exported as text
export-metrics-as-textbooleanfalseif set, the metrics will be exported as text
export-remove-extra-columnsbooleanfalseif set, the empty columns will be removed
export-excel-versionboolean2000
XP
2007
2000the Excel version to export the report in
use-separate-sheetsbooleanfalseif set, export will appear in separate sheets
sqlbooleanfalseif set, sql information will be returned in the "sql" result attribute
append-filterand
or
false
falseIf you are using filters, you may want to add the new filter to the filters of the document which are already set. If you set this attribute to "and", the new filter will be "and"-ed to the already existing one; if you set it to "or", they will be connected via an "or" connection; otherwise, use "false".
encodingUTF-8
ISO-8859-1
ISO-8859-2
The character encoding type of the returned xml. If not specified, the value specified at the connection definition will be applied.

Result Attributes

NameTypeDescription
idreport id of the requested report
msgidmessage id of the requested report
namename of the requested report
jobidthe job id; when multiple reports were executed (e.g. page-bys), their job ids are separated by ;
userlogin name of the connected user
projectproject name where the requested report is located
page_byattributes of the generated page. When generating more pages, it is a list
filter_detailstext value containing filter details
sqltext value containing the SQL query
rowcntnumbernumber of rows generated
errorMSTR error code when an error occurs
errorMessageMSTR error message when an error occurs

Examples

<mstr:excel xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xls" id="6533FDE9447AA3BBEC5161BCA5BFECC6"> <mstr:prompt id="B20D5C5042ADA78D115E13AD93B80CD3" value="Mid-Atlantic;Southeast"/> </mstr:excel>

mstr:execution-flag

Specifies an MSTR execution flag for report execution.

Attributes

NameTypePossible ValuesDefault ValueDescription
valueDssXmlExecutionFresh
DssXmlExecutionDefaultPrompt
DssXmlExecutionUseCache
DssXmlExecutionUpdateCache
DssXmlExecutionInboxKeepAsIs
DssXmlExecutionSaveToInbox
DssXmlExecutionResolve
DssXmlExecutionGenerateSQL
DssXmlExecutionCheckWebCache
DssXmlExecutionUseWebCacheOnly
DssXmlExecutionGenerateDatamart
DssXmlExecutionSubsetting
DssXmlExecutionReBuildPreviewOnly
DssXmlExecutionExport
DssXmlExecutionDefault
DssXmlExecutionDrillByManipulation
name of the execution flag

Examples

<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="4E463F794460EF4C0C45E98FD0E9D424"> <mstr:execution-flags append="true"> <mstr:execution-flag value="DssXmlExecutionGenerateSQL"/> </mstr:execution-flags> </mstr:report>

mstr:execution-flags

Collects the "execution-flag" settings.

Attributes

NameTypePossible ValuesDefault ValueDescription
appendbooleantrueif set, the original execution-flags will be not cleared before setting the corresponding execution-flags

Examples

<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="4E463F794460EF4C0C45E98FD0E9D424"> <mstr:execution-flags append="true"> <mstr:execution-flag value="DssXmlExecutionGenerateSQL"/> </mstr:execution-flags> </mstr:report>

mstr:export

Gets an mstr report in text format.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
subscription-idID of the subscription to use. If the report is also specified, it is required that the subscription belongs to the given report
subscription-namename of the subscription of the report to use. Only works if the report ID or name is specified. When multiple subscriptions of the same report share the same name, the index can be specified by ()s (e.g. "subscriptionname(3)")
cachebooleantrueif set, the execution will use the caching feature
update-cachebooleantrueif set, the execution will modify the cache
dafbooleanfalseif set, the attribute forms will be displayed in the exported report
separatorthe separator which will be used between cells upon calling the export method.
headerbooleantrueif set to false, the first line will be skipped
header-prefixthe prefix which will be prepended at the beginning of each header cell in the exported report.
header-postfixthe postfix which will be appended at the end of each header cell in the exported report.
metric-prefixthe prefix which will be prepended at the beginning of each metric value in the exported report.
metric-postfixthe postfix which will be appended at the end of each metric value in the exported report.
page-by-requiredbooleanfalseif set, the result attribute page_by will be set
filter-details-requiredbooleanfalseif set, the result attribute filter_details will be set. It is filled only when the report filter is set by mstr-web or mstr-developer applications. Otherwise result attribute "filter_details" is shown but it has an empty-text value.
sqlbooleanfalseif set, sql information will be returned in the "sql" result attribute
append-filterand
or
false
falseif you are using filters, you may want to add the new filter to the filters of the document which are already set. If you set this attribute to "and", the new filter will be "and"-ed to the already existing one; if you set it to "or", they will be connected via an "or" connection; otherwise, use "false"
export-remove-extra-columnsbooleanif set, the empty columns will be removed
include-report-namebooleanfalseif set, the report name will be included in the result
include-report-filterbooleanfalseif set, the report filter will be included in the result
encodingUTF-8
ISO-8859-1
ISO-8859-2
The character encoding type of the returned xml. If not specified, the value specified at the connection definition will be applied

Result Attributes

NameTypeDescription
idreport id of the requested report
msgidmessage id of the requested report
namename of the requested report
jobidthe job id; when multiple reports were executed (e.g. page-bys), their job ids are separated by ;
userlogin name of the connected user
projectproject name where the requested report is located
page_byattributes of the generated page. When generating more pages, it is a list
filter_detailstext value containing filter details
sqltext value containing the SQL query
rowcntnumbernumber of rows generated
errorMSTR error code when an error occurs
errorMessageMSTR error message when an error occurs

Examples

<mstr:export xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.txt" id="6533FDE9447AA3BBEC5161BCA5BFECC6"> <mstr:prompt id="B20D5C5042ADA78D115E13AD93B80CD3" value="Mid-Atlantic;Southeast"/> </mstr:export>

mstr:filter-group

Groups filter expressions for the mstr:report action (and its similar counterparts, mstr:export, mstr:excel and mstr:pdf). It can contain filter definitions and other filter-groups also, making possible to compose complex filtering expressions.

Attributes

NameTypePossible ValuesDefault ValueDescription
operator*and, &&
or, ||
not, !
the relation of the grouping

Examples

<mstr:pdf xmlns:kafka="http://zagreus.com/kafka" connection-name="mstr_connection" id="63450F49428E61C57ABDF9B92A034A88" output="result.pdf"> <mstr:filter-group operator="OR"> <mstr:filter variable="Country" operator="in" value="France;Web"/> <mstr:filter variable="Revenue" operator="greater or eq" value="300000"/> </mstr:filter-group> </mstr:pdf>

mstr:filter

Defines a filter expression for the mstr:report action (and its similar counterparts, mstr:export, mstr:excel mstr:pdf). Usually it is contained by mstr:filter-group, but can be used without explicit grouping also; in this case the filter expressions will be stored an implicitly created AND group.

Attributes

NameTypePossible ValuesDefault ValueDescription
nameName of the variable (attribute, metric, or attribute form) to filter to. To use attribute forms the attribute also has to be specified, like "Region.ID" or "Country:DESC"; characters ".", ":" and "\" can be used.
operator*=, equals, exactly
<>, !=, not equals, different
>, greater, more
<, less
>=, greater or eq, more or eq
<=, less or eq
between (for numerical values)
not between (for numerical values)
null, is null
not null
in, in list
not in, not in list
the relation of the check
valueA constant value. If the operator specified accepts or requires more values, these can be separated by ";"; in the case of "between" and "not between" operators, the two values can be separated by the word "and".

Examples

<mstr:excel xmlns:kafka="http://zagreus.com/kafka" connection-name="mstr_connection" id="63450F49428E61C57ABDF9B92A034A88" output="result.xls"> <mstr:filter variable="Region.ID" operator="between" value="3 and 5"/> <mstr:filter variable="Profit" operator=">" value="100000"/> </mstr:excel>
<mstr:pdf xmlns:kafka="http://zagreus.com/kafka" connection-name="mstr_connection" id="63450F49428E61C57ABDF9B92A034A88" output="result.pdf"> <mstr:filter-group operator="OR"> <mstr:filter variable="Country" operator="in" value="France;Web"/> <mstr:filter variable="Revenue" operator="greater or eq" value="300000"/> </mstr:filter-group> </mstr:pdf>

mstr:fireevent

Triggers an MSTR event.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used

Result Attributes

NameTypeDescription
idreport id of the requested report
msgidmessage id of the requested report
namename of the requested report
jobidthe job id; when multiple reports were executed (e.g. page-bys), their job ids are separated by ;
userlogin name of the connected user
projectproject name where the requested report is located
sessionidsession id
rowcntnumbernumber of rows generated
filter_detailstext value containing filter details
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<mstr:fireevent xmlns:kafka="http://zagreus.com/kafka" connection-name="example" id="6533FDE9447AA3BBEC5161BCA5BFECC6" name=""/>
<mstr:fireevent xmlns:kafka="http://zagreus.com/kafka" connection-name="example" id="" name="Books Closed"/>

mstr:flash

Gets an mstr report in flash format.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
cachebooleantrueif set, the execution will use the caching feature
historybooleantrueif set to true, the document will be inserted into the history list
formatformat of the flash exporting. If format is "mht", one mht file will be generated that will contains all data. If format is "files", separated files will be created for the swf file, for data for resources, for html page, and so on. Saving these files into a folder and starting the browser on the html file, the exported flash file can be displayed
page-by-timeoutnumbertimeout value for page generation. Overrides value specified in the connection

Result Attributes

NameTypeDescription
idreport id of the document requested
msgidmessage id of the document requested
namename of the document requested
userlogin name of the connected user
projectproject name where the document requested is located
errorMSTR error code when an error occurs
errorMessageMSTR error message when an error occurs

Examples

<mstr:flash xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" id="5C03D3F0402C7CB835E053A9388BB557" format="mht" output="xxx.mht"> <mstr:param name="ResBundleURL" type="resource" value="DashboardViewerBundle_1033.xml"/> <mstr:param name="NumberLocale" type="constant" value="1033"/> </mstr:flash>

mstr:getprojectinfo

Gets the information of a project specified by id or name, or all projects.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
idthe id of the project
namethe name of the project

Result Attributes

NameTypeDescription
rowcntnumberthe number of projects listed

Result Table

NameTypePossible ValuesDescription
project-id
project-name
alias
description
statusactive
errorstate
execidle
fullidle
metadataidle
offline
offlinepending
onlinepending
requestidle
warehouseidle
whexecidle
statusnumnumber

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:getprojectinfo connection-name="demo8" id="" name=""/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:getprojectinfo connection-name="demo8" id="" name="MicroStrategy Tutorial"/> </z:log>

mstr:getprojectstatus

Gets the project status (a text) of the given project, and its display mode.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used

Result Attributes

NameTypeDescription
msgidtextmessage id
jobidtextjob id
usertextusername who performed the copy action
projecttextproject name where the copy action executed
sessionidtextsession id
rowcntnumberthe number of returned rows
filter_detailstexttext value containing filter details
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
status
showtop
bottom
false

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:getprojectstatus connection-name="demo8"/> </z:log>

mstr:getpromptanswer

Retrieves the set prompt answers of a given subscription, document or report. If a subscription is specified (via subscription-id or subscription-name attributes), the prompt of that subscription will be retrieved; otherwise the report or document is handled. Note that it is possible to specify the id or name of the report/document along with subscription-name; this can help for better identification of the subscription (e.g. if we specify the report id and the subscription name at the same time, then the action checks only the subscriptions of the given report, thus confusion with several subscriptions with the same name but belonging to different reports/documents can be avoided).

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
prompt-idthe id of the prompt retrieved
prompt-namethe id of the prompt retrieved
prompt-idxnumberthe index of the prompt retrieved
xmltrue
false
all
truewhether to return the XML of the prompt answer ("true"), return the text answer ("false"), or return both ("all"). In the case of "all", both "value" and "idvalue" fields are returned. Currently false is implemented only for specific prompt types

Result Attributes

NameTypeDescription
rowcntnumberthe number of prompt answers returned

Result Table

NameTypePossible ValuesDescription
id
name
index
typeelements
expression
constant
dimensionality
objects
time
value
idvalue

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:getpromptanswer connection-name="mstrconn" subscription-name="sample subscription" prompt-idx="3-5"/> </z:log>
<mstr:getpromptanswer xmlns:kafka="http://zagreus.com/kafka" connection-name="mstrconn" subscription-id="AF9441B84BBC5CACCF971FACE1AF398A" xml="false" alias="promptans"/> <mstr:pdf xmlns:kafka="http://zagreus.com/kafka" connection-name="mstrconn" id="95C2508D4952A89C67D8829E04D1C274" output="out.pdf"> <mstr:prompt id="BE5EDB1247153A86D0A32B8AE8BB4754" value="${promptans[1].value}"/> </mstr:pdf>

mstr:historylist

Gets the entries in the MSTR history.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used

Result Attributes

NameTypeDescription
rowcntnumberthe number of history list entries listed

Result Table

NameTypePossible ValuesDescription
msgid
name
creationtimedate
starttimedate
finishtimedate
statusid
statusmsg
msgnum
msgtype
displayname
projectname
projectid
creator
subscriptionid
requesttype
objectid
folderid
foldername

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:historylist connection-name="demo8"/> </z:log>

mstr:htmldocument

Gets an MSTR htmldocument in html format.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
asyncbooleanfalseif set to true, the action returns immediately, without waiting for the execution of the document
cachebooleantrueif set, the execution will use the caching feature
historybooleanfalseif set, the report will be inserted into the history list
page-by-timeoutnumberTimeout value for page generation. Overrides value specified in the connection.

Result Attributes

NameTypeDescription
iddocument id of the document requested
msgidmessage id of the document requested
namename of the document requested
userlogin name of the connected user
projectproject name where the document is located
errorMSTR error code when an error occurs
errorMessageMSTR error message when an error occurs

Examples

<mstr:htmldocument xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.html" id="5C03D3F0402C7CB835E053A9388BB557"/>

mstr:joblist

Lists the actual jobs on the MSTR server. It can be filtered by inserting mstr:filter actions into it. One cannot filter for result attributes which appear only when details is set to "true". All filter conditions will be applied at the same time (i.e. they are AND-ed).

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
detailsbooleanfalsewhether to include details or not
sort-fieldWe can sort the results using the name of a result attribute. One cannot sort on result attributes which appear only when details is set to "true".
sort-orderascending
descending
ascendingthe type of sorting (i.e. ascending or descending)

Result Attributes

NameTypeDescription
rowcntnumberthe number of jobs listed

Result Table

NameTypePossible ValuesDescription
jobid
status
statusnamecanceled
completed
error
executing
ready
stopped
waiting
waiting-for-auto-prompt
waiting-for-cache
waiting-for-children
waiting-for-fetching-results
waiting-for-project
waiting-on-governer
username
userloginname
description
server-name
prioritynumber
project-idnumber
project-name
project-dssid
creationtimedate
durationnumber
client-machine
template (details)
filter-name (details)
task-num (details)number
finished-task-num (details)number
client-machine-port (details)number
sql (details)

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:joblist connection-name="demo8" details="false"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:joblist connection-name="mstr" details="false" sort-field="duration" sort-order="descending"> <mstr:filter variable="username" operator="=" value="JohnSmith"/> <mstr:filter variable="server-name" operator="=" value="DemoServer"/> </mstr:joblist> </z:log>

mstr:metric

Refers to a metric inside a mstr:metrics element, to put it on a certain axis.

Attributes

NameTypePossible ValuesDefault ValueDescription

Examples

<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="6533FDE9447AA3BBEC5161BCA5BFECC6"> <mstr:axis name="column"> <mstr:attribute name="Category"/> <mstr:metrics> <mstr:metric name="Revenue"/> <mstr:metric name="Profit"/> </mstr:metrics> </mstr:axis> </mstr:report>

mstr:metrics

Refers to the metrics collection, to put it on a certain axis. May contain mstr:metric elements. If no such elements are specified, the metrics collection will contain elements as stated in the report definition.

Examples

<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="6533FDE9447AA3BBEC5161BCA5BFECC6"> <mstr:axis name="column"> <mstr:attribute name="Category"/> <mstr:metrics> <mstr:metric name="Revenue"/> <mstr:metric name="Profit"/> </mstr:metrics> </mstr:axis> </mstr:report>

mstr:objectinfo

Gives information about a specified MSTR resource. Returned fields might differ based on the actual object type.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
typeAggMetric
Attribute
AttributeAbstract
AttributeForm
AttributeRole
AttributeTransformation
Catalog
CatalogDefn
Column
Configuration
Consolidation
ConsolidationElement
CustomGroup
DBConnection
DBLogin
DBMS
DBRole
DBTable
DBTablePMT
Datamart
DatamartReport
DbTable
Dimension
DimensionOrdered
DimensionSystem
DimensionUser
DimensionUserHierarchy
DocumentDefinition
DrillMap
Fact
FactGroup
Filter
Folder
FormNormal
FormSystem
Format
Function
FunctionPackageDefinition
InBox
InBoxMsg
Link
Locale
MDSecurityFilter
Metric
MetricDMX
Monitor
MonitorDBConnections
MonitorJobs
MonitorPerformance
MonitorUserConnections
Project
Prompt
PromptAnswer
PromptAnswerBigDecimal
PromptAnswerBoolean
PromptAnswerDate
PromptAnswerDimty
PromptAnswerDouble
PromptAnswerElements
PromptAnswerExpression
PromptAnswerExpressionDraft
PromptAnswerLong
PromptAnswerObjects
PromptAnswerString
PromptAnswers
PromptBigDecimal
PromptBoolean
PromptDate
PromptDimty
PromptDouble
PromptElements
PromptExpression
PromptExpressionDraft
PromptLong
PromptObjects
PromptString
PropertyGroup
PropertySet
ReportBase
ReportCube
ReportDatamart
ReportDefinition
ReportEngine
ReportGraph
ReportGrid
ReportGridAndGraph
ReportIncrementalRefresh
ReportNonInteractive
ReportText
ReportTransaction
ReportWritingDocument
Request
Resolution
Role
RoleTransformation
ScheduleEvent
ScheduleObject
ScheduleTrigger
Schema
Script
Search
SearchFolder
SecurityRole
ServerDef
Shortcut
Style
SubscriptionDevice
SubtotalDefinition
SystemSubtotal
Table
TablePartitionMD
TablePartitionWH
TableSource
Template
User
UserGroup
ReportDefinitionthe resource type; DocumentDefinition can be abbreviated as "document" and ReportDefinition as "report". It is required to set the correct object type

Result Table

NameTypePossible ValuesDescription
id
displayname
name
type
subtype
typenumnumber
subtypenumnumber
abbreviation
path
ownername
owner
ownerid
parentid
parentname
parentdisplayname
hiddenboolean
creationtimedate
lastmodtimedate
description
statenumber
datasources
flagsnumber

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:objectinfo connection-name="demo8" id="6533FDE9447AA3BBEC5161BCA5BFECC6"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:objectinfo connection-name="demo8" id="6533FDE9447AA3BBEC5161BCA5BFECC6" type="report"/> </z:log>

mstr:page-by-all

Specifies that during a report or document export, all possible page-by values should be exported.

Examples

<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="6533FDE9447AA3BBEC5161BCA5BFECC6"> <mstr:page-by-all/> </mstr:report>

mstr:page-by-selection

Contains a list of page-by elements for report or document export.

Examples

<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="6533FDE9447AA3BBEC5161BCA5BFECC6"> <mstr:page-by-selection> <page-by title="Mid-Atlantic" value="Revenue"></page-by> </mstr:page-by-selection> <mstr:page-by-selection> <page-by title="Northeast" value="Revenue"></page-by> </mstr:page-by-selection> </mstr:report>

mstr:page-by

A page-by entry nested in an mstr:page-by-selection action.

Attributes

NameTypePossible ValuesDefault ValueDescription
valuethe value of the page-by

Examples

<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="6533FDE9447AA3BBEC5161BCA5BFECC6"> <mstr:page-by-selection> <page-by title="Mid-Atlantic" value="Revenue"></page-by> </mstr:page-by-selection> <mstr:page-by-selection> <page-by title="Northeast" value="Revenue"></page-by> </mstr:page-by-selection> </mstr:report>

mstr:param

Can be used to specify the parameters for the swf file for the mstr:flash action. The required parameters depend on the swf file.

Attributes

NameTypePossible ValuesDefault ValueDescription
name*The name of the parameter
value*The value of the parameter
typeconstant
resource
constantthe type of the parameter

Examples

<mstr:flash xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" id="5C03D3F0402C7CB835E053A9388BB557" format="mht" output="xxx.mht"> <mstr:param name="ResBundleURL" type="resource" value="DashboardViewerBundle_1033.xml"/> <mstr:param name="NumberLocale" type="constant" value="1033"/> </mstr:flash>

mstr:pdf

Gets an MSTR report in PDF format.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
subscription-idID of the subscription to use. If the report is also specified, it is required that the subscription belongs to the given report
subscription-namename of the subscription of the report to use. Only works if the report ID or name is specified. When multiple subscriptions of the same report share the same name, the index can be specified by ()s (e.g. "subscriptionname(3)")
cachebooleantrueif set, the execution will use the caching feature
update-cachebooleantrueif set, the execution will modify the cache
page-by-requiredbooleanfalseif set, the result attribute page_by will be set
filter-details-requiredbooleanfalseif set, the result attribute filter_details will be set
page-by-timeoutnumberTimeout value for page generation. Overrides value specified in the connection.
expand-all-pagesbooleanfalseif set, all pages will be exported
margin-leftnumberleft margin in units specified in parameter "measurement-unit"
margin-rightnumberright margin in units specified in parameter "measurement-unit"
margin-topnumbertop margin in units specified in parameter "measurement-unit"
margin-bottomnumberbottom margin in units specified in parameter "measurement-unit"
header-leftleft header value
header-centercenter header value
header-rightright header value
footer-leftleft footer value
footer-centercenter footer value
footer-rightright footer value
coverpagebooleanif set, cover page will be exported
max-header-sizenumbermax height of the header in units specified in parameter "measurement-unit"
max-footer-sizenumbermax height of the footer in units specified in parameter "measurement-unit"
orientationportrait
landscape
page orientation
paper-widthnumberpaper width in units specified in parameter "measurement-unit"
paper-heightnumberpaper height in units specified in parameter "measurement-unit"
paper-typeletter
legal
executive
folio
A3
A4
A5
paper type
scale-percentagenumberpercentage of page scale of the exported PDF
scale-pages-widebooleanfalseif set, fits report width to page width
scale-pages-tallbooleanfalseif set, fits report height to page height
measurement-unitcm
in
mm
pt
pc
cmunit type for measurement
sqlbooleanfalseif set, sql information will be returned in the "sql" result attribute
append-filterand
or
false
falseIf you are using filters, you may want to add the new filter to the filters of the document which are already set. If you set this attribute to "and", the new filter will be "and"-ed to the already existing one; if you set it to "or", they will be connected via an "or" connection; otherwise, use "false".
embed-fontsbooleantrue
false
reportsetting
reportsettingif set to "true", the used fonts will be embedded in the generated PDF. If set to "false", the fonts will not be embedded. By leaving this attribute empty or entering "reportsetting", the setting of the report will be used.
encodingUTF-8
ISO-8859-1
ISO-8859-2
The character encoding type of the returned xml. If not specified, the value specified at the connection definition will be applied.

Result Attributes

NameTypeDescription
idreport id of the requested report
msgidmessage id of the requested report
namename of the requested report
jobidthe job id; when multiple reports were executed (e.g. page-bys), their job ids are separated by ;
userlogin name of the connected user
projectproject name where the requested report is located
page_byAttributes of the generated page. When generating more pages, it is a list.
filter_detailstext value containing filter details
sqltext value containing the SQL query
rowcntnumbernumber of rows generated
errorMSTR error code when an error occurs
errorMessageMSTR error message when an error occurs

Examples

<mstr:pdf xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.pdf" id="6533FDE9447AA3BBEC5161BCA5BFECC6"> <mstr:prompt id="B20D5C5042ADA78D115E13AD93B80CD3" value="Mid-Atlantic;Southeast"/> </mstr:pdf>

mstr:prompt

Sets answers for filter prompts.

Attributes

NameTypePossible ValuesDefault ValueDescription
idthe identifier of the filter prompt question
namethe name or path of the filter prompt question
value*the answer for the prompt

Examples

<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="6533FDE9447AA3BBEC5161BCA5BFECC6"> <mstr:prompt id="B20D5C5042ADA78D115E13AD93B80CD3" value="Mid-Atlantic;Southeast"/> </mstr:report>
<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="6533FDE9447AA3BBEC5161BCA5BFECC6"> <mstr:prompt name="\Public Objects\Reports\etixpert\evn\region?" value="Mid-Atlantic;Southeast"/> </mstr:report>
<mstr:export xmlns:kafka="http://zagreus.com/kafka" connection-name="Aphrodite" id="4DE1F47C403C2994D6A85C84178FE9F1" output="out.txt"> <mstr:prompt id="9DE9F23C4FE51B538D1B8F8B70FB266F"> <mstr:prompt name="Country" value="In (USA)"/> <mstr:prompt value="OR"> <mstr:prompt name="Region" value="In (Mid-Atlantic)"/> <mstr:prompt name="Region" value="In (Northeast)"/> </mstr:prompt> </mstr:prompt> </mstr:export>
<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="6533FDE9447AA3BBEC5161BCA5BFECC6"> <mstr:prompt id="9DE9F23C4FE51B538D1B8F8B70FB266F" value="<mi lcl=&quot;1033&quot;><in><oi id=&quot;1&quot; did=&quot;9C75A1CA4BB1FA5089C74F81C1AD0512&quot; ab=&quot;&quot; icp=&quot;&quot; vr=&quot;46D56F5E4767644E0F3BB2A567D347B9&quot; des=&quot;&quot; n=&quot;Elements of Year&quot; tp=&quot;10&quot; stp=&quot;2567&quot; acg=&quot;255&quot; sta=&quot;536875391&quot; ext_type=&quot;0&quot; hid=&quot;0&quot;><mi><in><oi id=&quot;2&quot; did=&quot;9C75A1CA4BB1FA5089C74F81C1AD0512&quot; ab=&quot;&quot; icp=&quot;&quot; vr=&quot;46D56F5E4767644E0F3BB2A567D347B9&quot; des=&quot;&quot; n=&quot;Elements of Year&quot; tp=&quot;10&quot; stp=&quot;2567&quot; acg=&quot;255&quot; sta=&quot;536875391&quot; ext_type=&quot;0&quot; hid=&quot;0&quot; mf=&quot;1&quot; /><oi id=&quot;3&quot; did=&quot;8D679D5111D3E4981000E787EC6DE8A4&quot; ab=&quot;&quot; icp=&quot;&quot; vr=&quot;BEFDAAB040F2CC8E437388A32BA0C50E&quot; des=&quot;&quot; n=&quot;Year&quot; tp=&quot;12&quot; stp=&quot;3072&quot; acg=&quot;255&quot; sta=&quot;1073873279&quot; ext_type=&quot;0&quot; hid=&quot;0&quot; /></in><pif cl=&quot;1&quot; pin=&quot;1&quot; pt=&quot;7&quot;><pa ia=&quot;1&quot;><mi><in><oi ab=&quot;&quot; acg=&quot;255&quot; des=&quot;&quot; did=&quot;8D679D5111D3E4981000E787EC6DE8A4&quot; dirty=&quot;0&quot; icp=&quot;&quot; id=&quot;4&quot; n=&quot;Year&quot; nct=&quot;&quot; nmdt=&quot;&quot; sta=&quot;1073873279&quot; stp=&quot;3072&quot; tp=&quot;12&quot; vr=&quot;BEFDAAB040F2CC8E437388A32BA0C50E&quot; /></in><es><at rfd=&quot;4&quot; /><e art=&quot;1&quot; disp_id=&quot;1&quot; disp_n=&quot;2008&quot; ei=&quot;8D679D5111D3E4981000E787EC6DE8A4:2008&quot; emt=&quot;1&quot;><fv bfi=&quot;0&quot;>2008</fv></e><e art=&quot;1&quot; disp_id=&quot;2&quot; disp_n=&quot;2010&quot; ei=&quot;8D679D5111D3E4981000E787EC6DE8A4:2010&quot; emt=&quot;1&quot;><fv bfi=&quot;0&quot;>2010</fv></e></es></mi></pa><loc pin=&quot;0&quot; ipm=&quot;1&quot; tp=&quot;10&quot; did=&quot;9C75A1CA4BB1FA5089C74F81C1AD0512&quot; /><loc pin=&quot;1&quot; ipm=&quot;0&quot; tp=&quot;1&quot; did=&quot;26AC685F4DC3B160D0D79DA74B145DC3&quot; /></pif></mi></oi></in></mi>"/> </mstr:report>

mstr:purge-cache

Purges the cache of the MSTR server for the given project.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
cache-typeelement
object
report
all
reportthe type of cache to purge

Examples

<mstr:purgecache xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" cache-type="report"/>

mstr:purgecache

Purges the cache of the MSTR server for the given project.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
cache-typeelement
object
report
all
reportthe type of cache to purge

Examples

<mstr:purgecache xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" cache-type="report"/>

mstr:rename

Renames an MSTR resource.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
typeAggMetric
Attribute
AttributeForm
Catalog
CatalogDefn
Column
Configuration
Consolidation
ConsolidationElement
Datamart
DatamartReport
DBConnection
DBLogin
DBMS
DBRole
DbTable
Dimension
DocumentDefinition
DrillMap
Fact
FactGroup
Filter
Folder
Format
Function
FunctionPackageDefinition
Generic
Link
Locale
MDSecurityFilter
Metric
Monitor
Project
Prompt
PromptAnswer
PromptAnswers
PropertySet
ReportDefinition
Request
Reserved
ReservedLastOne
Resolution
Role
ScheduleEvent
ScheduleObject
ScheduleTrigger
Schema
Script
Search
SearchFolder
SecurityRole
ServerDef
Shortcut
Style
SubscriptionDevice
Table
TableSource
Template
Unknown
User
ReportDefinitionthe type of the report to rename
new-name*the new name of the resource

Examples

<mstr:rename xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" id="6533FDE9447AA3BBEC5161BCA5BFECC6" type="Folder" new-name="renamed folder"/>

mstr:report

Gets an mstr report in xml format or as an image.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
subscription-idID of the subscription to use. If the report is also specified, it is required that the subscription belongs to the given report
subscription-namename of the subscription of the report to use. Only works if the report ID or name is specified. When multiple subscriptions of the same report share the same name, the index can be specified by ()s (e.g. "subscriptionname(3)")
bandingbooleanfalseit sets the cell grouping
rowsnumberit limits the maximum number of rows to get
asyncbooleanfalseif set, the action returns immediately, without waiting for the execution of the report
historybooleanfalseif set, the report will be inserted into the history list
sqlbooleanfalseif set, sql information will be included in the xml, and the "sql" result attribute is also filled
cachebooleantrueif set, the execution will use the caching feature
update-cachebooleantrueif set, the execution will modify the cache
graphbooleanfalseif set to "true" result is returned as a graph/chart in image format
page-by-requiredbooleanfalseif set, the result attribute page_by will be set
filter-details-requiredbooleanfalseif set, the result attribute filter_details will be set
page-by-timeoutnumberit sets the page-by timeout
append-filterand
or
false
falseIf you are using filters, you may want to add the new filter to the filters of the document which are already set. If you set this attribute to "and", the new filter will be "and"-ed to the already existing one; if you set it to "or", they will be connected via an "or" connection; otherwise, use "false".
encodingUTF-8
ISO-8859-1
ISO-8859-2
The character encoding type of the returned xml. If not specified, the value specified at the connection definition will be applied.

Result Attributes

NameTypeDescription
idreport id of the requested report
msgidmessage id of the requested report
namename of the requested report
jobidthe job id; when multiple reports were executed (e.g. page-bys), their job ids are separated by ;
userlogin name of the connected user
projectproject name where the requested report is located
page_byattributes of the generated page. When generating more pages, it is a list
filter_detailstext value containing filter details
sqltext value containing the SQL query
rowcntnumbernumber of rows generated
errorMSTR error code when an error occurs
errorMessageMSTR error message when an error occurs

Examples

<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="6533FDE9447AA3BBEC5161BCA5BFECC6"> <mstr:prompt id="B20D5C5042ADA78D115E13AD93B80CD3" value="Mid-Atlantic;Southeast"/> </mstr:report>

mstr:result-flag

Specifies an MSTR result flag for report execution.

Attributes

NameTypePossible ValuesDefault ValueDescription
valueDssXmlResultDtlsExprNothing
DssXmlResultDtlsExprEmbedded
DssXmlResultDtlsExprAll
DssXmlResultXmlSQL
DssXmlResultDtlsTemplateLimits
DssXmlResultDtlsTemplateUnit
DssXmlResultWorkingSet
DssXmlResultNoDerivedPromptXml
DssXmlResultXmlDisplayProperties
DssXmlResultNoResolution
DssXmlResultGraph
DssXmlResultFilter
DssXmlResultBandingAutoApply
DssXmlResultRawData
DssXmlResultDrillHigh
DssXmlResultDrillMedium
DssXmlResultDrillLow
DssXmlResultGrid
DssXmlResultBandingStyle
DssXmlResultFolderPath
DssXmlResultRelatedReports
DssXmlResultNoPageHeader
DssXmlResultMinimal
DssXmlResultViewReport
DssXmlResultPutToInboxRead
DssXmlResultStatusOnlyIfNotReady
DssXmlResultNoNumberFormatting
DssXmlResultInboxMessage
DssXmlResultDefaultFormatProperties
DssXmlResultDatamartTableName
DssXmlResultPageTreeStyle
DssXmlResultPreserve
DssXmlResultPositiveFlags
name of the result flag

Examples

<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="4E463F794460EF4C0C45E98FD0E9D424"> <mstr:result-flags append="true"> <mstr:result-flag value="DssXmlResultBandingStyle"/> </mstr:result-flags> <mstr:execution-flags append="true"> <mstr:execution-flag value="DssXmlExecutionGenerateSQL"/> </mstr:execution-flags> </mstr:report>

mstr:result-flags

Collects the "result-flag" settings.

Attributes

NameTypePossible ValuesDefault ValueDescription
appendbooleantrueif set, the original result-flags will be not cleared before setting the corresponding result-flags

Examples

<mstr:report xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" output="xxx.xml" id="4E463F794460EF4C0C45E98FD0E9D424"> <mstr:result-flags append="true"> <mstr:result-flag value="DssXmlResultBandingStyle"/> </mstr:result-flags> <mstr:execution-flags append="true"> <mstr:execution-flag value="DssXmlExecutionGenerateSQL"/> </mstr:execution-flags> </mstr:report>

mstr:session-flag

Specifies an MSTR session flag for connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
valueDssXmlSessionCancelActiveJobsOnClose
DssXmlSessionChangePwdOnCreate
DssXmlSessionCheckWebCache
DssXmlSessionDeleteReadMsgsOnClose
DssXmlSessionDeleteUnreadMsgsOnClose
DssXmlSessionKeepPromptJobOnClose
DssXmlSessionPreserveFlags
DssXmlSessionUseWebCacheOnly
DssXmlSessionCheckWebCachename of the session flag

Examples

<mstr:connection xmlns:kafka="http://zagreus.com/kafka" name="demo8" server="62.99.218.122" user="administrator" project="Microstrategy Tutorial"> <mstr:session-flags append="true"> <mstr:session-flag value="DssXmlSessionKeepPromptJobOnClose"/> </mstr:session-flags> </mstr:connection>

mstr:session-flags

Collects the "session-flag" settings for session flags for MSTR connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
appendbooleantrueif set, the original session-flags will be not cleared before setting the corresponding session-flags

Examples

<mstr:connection xmlns:kafka="http://zagreus.com/kafka" name="demo8" server="62.99.218.122" user="administrator" project="Microstrategy Tutorial"> <mstr:session-flags append="true"> <mstr:session-flag value="DssXmlSessionKeepPromptJobOnClose"/> </mstr:session-flags> </mstr:connection>

mstr:setdescription

Sets the description of a specified MSTR resource.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
typeAggMetric
Attribute
AttributeAbstract
AttributeForm
AttributeRole
AttributeTransformation
Catalog
CatalogDefn
Column
Configuration
Consolidation
ConsolidationElement
CustomGroup
DBConnection
DBLogin
DBMS
DBRole
DBTable
DBTablePMT
Datamart
DatamartReport
DbTable
Dimension
DimensionOrdered
DimensionSystem
DimensionUser
DimensionUserHierarchy
DocumentDefinition
DrillMap
Fact
FactGroup
Filter
Folder
FormNormal
FormSystem
Format
Function
FunctionPackageDefinition
InBox
InBoxMsg
Link
Locale
MDSecurityFilter
Metric
MetricDMX
Monitor
MonitorDBConnections
MonitorJobs
MonitorPerformance
MonitorUserConnections
Project
Prompt
PromptAnswer
PromptAnswerBigDecimal
PromptAnswerBoolean
PromptAnswerDate
PromptAnswerDimty
PromptAnswerDouble
PromptAnswerElements
PromptAnswerExpression
PromptAnswerExpressionDraft
PromptAnswerLong
PromptAnswerObjects
PromptAnswerString
PromptAnswers
PromptBigDecimal
PromptBoolean
PromptDate
PromptDimty
PromptDouble
PromptElements
PromptExpression
PromptExpressionDraft
PromptLong
PromptObjects
PromptString
PropertyGroup
PropertySet
ReportBase
ReportCube
ReportDatamart
ReportDefinition
ReportEngine
ReportGraph
ReportGrid
ReportGridAndGraph
ReportIncrementalRefresh
ReportNonInteractive
ReportText
ReportTransaction
ReportWritingDocument
Request
Resolution
Role
RoleTransformation
ScheduleEvent
ScheduleObject
ScheduleTrigger
Schema
Script
Search
SearchFolder
SecurityRole
ServerDef
Shortcut
Style
SubscriptionDevice
SubtotalDefinition
SystemSubtotal
Table
TablePartitionMD
TablePartitionWH
TableSource
Template
User
UserGroup
ReportDefinitionthe resource type; DocumentDefinition can be abbreviated as "document" and ReportDefinition as "report"
description*the new description of the MSTR resource

Examples

<mstr:setdescription xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" id="6533FDE9447AA3BBEC5161BCA5BFECC6" type="project" description="This is a <sample> MSTR project"/>
<mstr:setdescription xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" path="Etixpert Test Project" type="project" description="This is a <sample> MSTR project"/>
<mstr:setdescription xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" path="Test Folder/Test report" type="report" description="This is a <sample> MSTR report"/>

mstr:setprojectstatus

Sets the status (a text) of the current project. The status has to be specified as the child text.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
showtop
bottom
false or no
where to display the status

Examples

<mstr:setprojectstatus xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" show="top">example project status</mstr:setprojectstatus>

mstr:subscription

Creates a new subscription or edits an existing one on the MSTR server for the given report or document. For editing subscription-id or subscription-name has to be specified, otherwise a new subscription will be created. If editing a subscriptions, not all mandatory attributes have to be specified (i.e. for creating a new subscription the trigger has to be specified either by "trigger-id" or "trigger-name"; when editing an already existing subscription, we can leave these attributes empty, meaning no change in triggers).

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
typeInbox or History List
Mobile
E-mail or Email
File
Print or Printer
Inboxthe type of the new subscription
recipientthe recipients of the subscription; a subscription can have several recipients, which have to be separated by ";"s
titlethe name (title) of the subscription will be set (in the case of a new subscription) or changed (in the case of an existing subscription) to the value specified by this attribute
formatHTML
Excel
PDF
CSV
Plain Text or PlainText or Text
Flash
Export Flash or ExportFlash
HTML Flash
View
Editable
Interactive
Streaming
HTMLThe result format of the new subscription. It depends on the actual report/document and the subscription type, which ones are supported.
send-nowbooleanfalsewhether to send a copy now
overwritebooleanfalsewhether to overwrite older versions of results at execution
filenamethe name of the resulting file for types "E-mail" and "File"
subjectthe subject of the e-mail for type "E-mail"
zip-filenamethe name of zip file for types "E-mail" and "File" (no zipping will occur if left empty)
zip-passwordthe password of zip file for types "E-mail" and "File" (no encryption will occur if left empty)
copiesnumber1the number of copies to print for type "Printer"
collatebooleanfalsewhether to collate the pages to print for type "Printer"
print-rangenumberthe interval of pages to print for type "Printer" (e.g. "5" or "9-13"); by default, all pages are printed
expirethe date of the expiration of the new subscription
allow-change-deliverybooleanfalsewhether to allow the recipients to change delivery settings
allow-change-personalizationbooleanfalsewhether to allow the recipients to change personalization
allow-unsubscribebooleanfalsewhether to allow the recipients to unsubscribe
expand-layoutsbooleanfalsewhether to expand layouts
expand-pagebystrue
false
separate
falsewhether to expand layouts
delimiterthe new delimiter of the subscription (if allowed)

Result Table

NameTypePossible ValuesDescription

Examples

<mstr:subscription xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" id="6533FDE9447AA3BBEC5161BCA5BFECC6" type="History List" format="PDF" recipient="Administrator;Business User" trigger-name="Books Closed" title="Demo Subscription" allow-unsubscribe="true"> <mstr:prompt id="B20D5C5042ADA78D115E13AD93B80CD3" value="Mid-Atlantic;Southeast"/> </mstr:subscription>
<mstr:subscription xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" subscription-id="3FDE9447AA3BBEC5161BCA5BFECC6123" trigger-name="Books Closed"/>

mstr:subscriptionlist

Lists the available subscriptions and their details on the MSTR server. The result can be filtered by using a number of parameters; there is an AND connection between them. Subscriptions with several recipients will be multiply shown.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
idthe id of the report or document for filtering
namethe id of the report or document for filtering
subscription-idthe id of the subscription for filtering
subscription-namethe id of the subscription for filtering
typeInbox or History List
Mobile
E-mail or Email
File
Print or Printer
the type of the subscription for filtering
formatHTML
Excel
PDF
CSV
Plain Text or PlainText or Text
Flash
Export Flash or ExportFlash
HTML Flash
View
Editable
Interactive
Streaming
the result format of the new subscription for filtering
recipientthe recipients subscription for filtering
ownerthe owner subscription for filtering
trigger-idthe trigger id filter
trigger-namethe trigger name filter (e.g. "All the Time")
max-list-attemptsnumber3Number of max. list attempts before looking for no further subscriptions.

Result Attributes

NameTypeDescription
rowcntnumberthe number of subscriptions listed

Result Table

NameTypePossible ValuesDescription
subscription-id
subscription-name
owner-id
owner
report-id
report-name
trigger-id
trigger-name
type
format
description
personalizedboolean
expiredate
isexpiredboolean
overwriteboolean
filename
subject
compressedboolean
zip-filename
zip-encryptedboolean
zip-password
copiesnumber
collateboolean
portraitboolean
use-print-rangeboolean
print-range-startnumber
print-range-endnumber
allow-change-deliveryboolean
allow-change-personalizationboolean
allow-unsubscribeboolean
recipient
child-subscription-id
address-name
address-value

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:subscriptionlist connection-name="exampleconn" type="Email"/> </z:log>
<zs:subscriptionlist xmlns:kafka="http://zagreus.com/kafka" connection-name="adam" script-name="/users/zagreus_test/subscriptions/worker_name" fullpath="false" alias="bbb" output="bbb.txt"/>
<z:foreach xmlns:kafka="http://zagreus.com/kafka" key="hl"> <z:in> <mstr:subscriptionlist connection-name="aphrodite" id="A34662644A8FE97CAED65CBE79D98FBB"/> </z:in> <z:log>${hl.statusid}</z:log> <z:variable name="c">${number(hl.subscriptionId)}</z:variable> <z:log>$c</z:log> </z:foreach>

mstr:user

Creates a new user or edits an existing one on the MSTR server. If the user is specified via either id, login or fullname, it will be edited; otherwise a new user is created.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
idid of the user to edit
loginlogin of the user to edit
fullnamefull name of the user to edit
enabledbooleantrueby using this attribute we can enable or disable the given user
newloginThe new login of the user. If a new user is created, this is required.
newfullnamethe new full name of the user
descriptionthe new description
passwordthe new password
cpasswordthe new encrypted password
groupsthe parent user groups, separated by ;s
can-change-passwordbooleansets whether the user can change his or her password
must-change-passwordbooleansets whether the user has to changes his or her password after the next login
standard-auth-allowedbooleansets whether standard authentication is allowed
password-expiresbooleansets whether the user's password will expire
password-expiration-freqnumberthe frequency of the password's expiration in days. If set, it also changes password-expires to true
password-expiration-datenumberthe date of the password's expiration. If set, it also changes password-expires to true
win-loginthe new Windows login of the user
ldap-loginthe new LDAP login of the user
database-loginthe new database login of the user
database-passwordthe new database password
database-cpasswordthe new encrypted database password
trusted-loginthe new trusted login user id of the user

Result Table

NameTypePossible ValuesDescription

Examples

<mstr:user xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" id="6533FDE9447AA3BBEC5161BCA5BFECC6" enabled="false"/>
<mstr:user xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" login="demouser8" newlogin="demouser8_old" newfullname="Backup Demo8 User"/>

mstr:userconnectionlist

Lists the actual user connections of the MSTR server. It can be filtered by inserting mstr:filter actions into it; its "variable" attribute has to be set to the appropriate result attribute of the mstr:userconnectionlist action, the "operator" attribute has to be "in", "between", "=", "<", "<=", ">" and ">=", and the "value" attribute has to contain the value used for filtering. Multiple values can be used if separated by ";"s. All filter conditions will be applied at the same time (i.e. they are AND-ed).

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used
sort-fieldwe can sort the results using the name of a result attribute
sort-orderascending
descending
ascendingthe type of sorting (i.e. ascending or descending)

Result Attributes

NameTypeDescription
rowcntnumberthe number of user connections listed

Result Table

NameTypePossible ValuesDescription
clientidthe client id of the user connection
clientportnumberthe client port of the user connection
clienttypemobile
officews
webservices
agent
scheduler
sysadmin
web
the client type of the user connection
usernamethe user name of the owner of the connection
loginnamethe login name of the owner of the connection
sessionidthe session ID of the connection
servernamethe name of the server
projectidthe DSS ID of the project
projectidnumnumberthe ID of the project
projectnamethe name of the project
openjobsnumberthe number of open jobs
connectiontimedatethe time when the connection was connected
durationnumberthe duration of the connection in seconds
firstjobtimethe first time a job was submitted in this connection
lastjobtimethe last time a job was submitted in this connection

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:userconnectionlist connection-name="mstr" sort-field="username" sort-order="descending"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:userconnectionlist connection-name="mstr"> <mstr:filter variable="username" operator="=" value="JohnSmith"/> </mstr:userconnectionlist> </z:log>

mstr:webprojectlist

Lists the currently loaded projects on the MSTR server.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used

Result Attributes

NameTypeDescription
rowcntnumberthe number of web projects listed

Result Table

NameTypePossible ValuesDescription
project-namethe name of the project
project-idthe ID of the project
aliasthe type of the project
descriptionthe description of the project
statusexecuting
pause
stopped
the status of the project
statusnumnumberthe status constant value of the project

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <mstr:webprojectlist connection-name="mstr"/> </z:log>

mstr:xmlapi

Sends an xml content to the MSTR server

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR connection used

Result Table

NameTypePossible ValuesDescription

Examples

<mstr:xmlapi xmlns:kafka="http://zagreus.com/kafka" connection-name="my-connection" alias="xmlResponse"> &lt;st&gt;&lt;sst&gt;&lt;st&gt;&lt;cmd&gt;&lt;gps in_cluster="1" os="0"&gt;&lt;reg_opt lcl_rsl="1"&gt;&lt;reg_md lcl_id="1033" lcl_rsl="0"/&gt;&lt;/reg_opt&gt;&lt;/gps&gt;&lt;/cmd&gt;&lt;/st&gt;&lt;/sst&gt;&lt;/st&gt; </mstr:xmlapi>

mstrrest:call

Calls a MSTR REST API function.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*the name of the MSTR REST connection used
api-path*the (relative) API path (e.g. /api/folders)
http-method*GET
POST
HEAD
PUT
DELETE
PATCH
the HTTP method used (e.g. GET, POST)
result-typezagreus
json
the return type of the result(if the operation has a result)

Result Attributes

NameTypeDescription
http_methodthe HTTP method of the rest call
rest_urlthe complete rest url sent to the server
request_bodythe request body sent to the server in case of e.g. a POST call
request_parametersthe request parameters sent to the server in case of a GET or DELETE call
header_parametersthe HTTP header parameters sent to the server
http_response_codenumberthe response code returned by the server

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka"> <mstrrest:call connection-name="restconn" api-path="/api/folders/58D0210140757B436A3EA09BB67B74DB" http-method="GET" result-type="zagreus"> </mstrrest:call> </z:log>
<z:log xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka"> <mstrrest:call connection-name="restconn" api-path="/api/folders" http-method="POST" result-type="zagreus"> <mstrrest:request-param name="fields" value="id,owner"/> { "name": "new folder", "description": "description of a new folder", "parent": "58D0210140757B436A3EA09BB67B74DB" } </mstrrest:call> </z:log>
<mstrrest:call xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" connection-name="restconn" api-path="/api/objects/207E4FC946BD38A946E6429AD5290F5C" http-method="DELETE" result-type="zagreus"> <mstrrest:request-param name="type" value="8"/> </mstrrest:call>

mstrrest:close

Closes the MSTR REST connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*the name of the MSTR REST connection used

Examples

<mstrrest:connection xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" name="restconn" url="http://server.domain.com:8080/MicroStrategyLibrary" user="admin" password="admin" cpassword="" project="project_1"/> <z:for xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" loop-counter="i" from="1" to="10" step="1"> <mstrrest:pushdata connection-name="restconn" cube-id="$cubeId" table-name="TABLE_1"> <z:array alias="inputdata"> <z:alias name="integer">1</z:alias> <z:alias name="biginteger">123456789</z:alias> </z:array> </mstrrest:pushdata> </z:for> <z:for xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" loop-counter="i" from="1" to="10" step="1"> <mstrrest:pushdata connection-name="restconn" cube-id="$cubeId" table-name="TABLE_1"> <z:array alias="inputdata"> <z:alias name="integer">1</z:alias> <z:alias name="biginteger">123456789</z:alias> </z:array> </mstrrest:pushdata> </z:for> <mstrrest:close xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" connection-name="restconn"/>

mstrrest:connection

Defines an MSTR REST connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
name*the name of the connection
urlhttp://127.0.0.1:8080/MicroStrategyLibraryMSTR REST URL full address (with port)
user*the user name for authentication
passwordthe password for user authentication
cpasswordthe encrypted password for user authentication
project*MicroStrategy Tutorialthe project name to use
authenticationstandard
ldap
standardthe type of authentication

Examples

<mstrrest:connection xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" name="restconn" host="http://sample.server.com:8080/MicroStrategyLibrary" user="administrator" password="samplepass" project="Microstrategy Tutorial"/> <mstrrest:createcube xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" connection-name="restconnection" cube-name="Sample Cube" table-name="SAMPLETABLE"> <mstr:header name="ID" datatype="INTEGER" type="attribute"/> <mstr:header name="SAMPLEDATE" datatype="DATE" type="attribute"/> <mstr:header name="REVENUE" datatype="DOUBLE" type="metric"/> </mstrrest:createcube>

mstrrest:createcube

Creates a new MSTR cube instance. The columns of the cube has to be set in child mstrrest:header elements.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*the name of the MSTR REST connection used
cube-name*the name of the cube to create
table-name*the name of the table inside the cube

Result Attributes

NameTypeDescription
create_cube_jsonthe JSON string sent to the MSTR REST server

Result Table

NameTypePossible ValuesDescription

Examples

<mstrrest:createcube xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" connection-name="restconnection" cube-name="Sample Cube" table-name="SAMPLETABLE"> <mstrrest:header name="ID" datatype="INTEGER" type="attribute"/> <mstrrest:header name="SAMPLEDATE" datatype="DATE" type="attribute"/> <mstrrest:header name="REVENUE" datatype="DOUBLE" type="metric"/> </mstrrest:createcube>

mstrrest:header-param

Refers to a header parameter of the mstrrest:call action. Note: when using "X-MSTR-ProjectID" parameter in this action, it overrides the ProjectID value defined in the mstrrest:connection!

Attributes

NameTypePossible ValuesDefault ValueDescription
name*name of the header parameter
valuevalue of the header parameter

Examples

<z:log xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka"> <mstrrest:call connection-name="restconn" api-path="/api/projects" http-method="POST" result-type="zagreus"> <mstrrest:header-param name="X-MSTR-AsyncMode" value="true"/> { "name": "new project", "description": "description of a new project" } </mstrrest:call> </z:log>
<mstrrest:call xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" connection-name="restconn" api-path="/api/projects" http-method="POST" result-type="json"> <mstrrest:header-param name="X-MSTR-AsyncMode" value="true"/> {"name": "Test Project", "description": "Created by Zagreus"} </mstrrest:call>

mstrrest:header

Refers to an attribute or metric for the mstrrest:createcube action

Attributes

NameTypePossible ValuesDefault ValueDescription
name*name of the attribute or metric
datatype*STRING
INTEGER
BIGINTEGER
BOOL
DOUBLE
BIGDECIMAL
DATE
TIME
DATETIME
the data type of the attribute or metric
typeattribute
metric
attributethis attribute specifies whether the given header element is an attribute or a metric

Examples

<mstrrest:createcube xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" connection-name="restconn" cube-name="Sample Cube" table-name="SAMPLETABLE"> <mstrrest:header name="ID" datatype="INTEGER" type="attribute"/> <mstrrest:header name="SAMPLEDATE" datatype="DATE" type="attribute"/> <mstrrest:header name="REVENUE" datatype="DOUBLE" type="metric"/> </mstrrest:createcube>

mstrrest:pushdata

Pushes data to an MSTR cube instance through an MSTR REST connection. The data must be set in a Zagreus record or a Zagreus table structure.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-name*name of the MSTR REST connection used
cube-id*ID of the cube to push data into
table-name*name of the table inside the cube to push data into

Result Attributes

NameTypeDescription
open_session_jsonthe JSON string sent to open the MSTR REST upload session
push_data_jsonthe JSON string sent to push the data
session_idthe upload session ID
rowcntnumbernumber of rows parsed and sent

Examples

<mstrrest:pushdata xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" connection-name="restconnection" cube-instance-id="40CD4E2D49BB3649800389BDB205769E" table-name="SAMPLETABLE"> <z:parse row-separator="\n" column-separator=";" header="true"> <file:read filename="sampledata.csv" binary="false"/> </z:parse> </mstrrest:pushdata>

mstrrest:request-param

Refers to a request parameter of the mstrrest:call action

Attributes

NameTypePossible ValuesDefault ValueDescription
name*name of the parameter
valuevalue of the parameter

Examples

<z:log xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka"> <mstrrest:call connection-name="restconn" api-path="/api/folders" http-method="POST" result-type="zagreus"> <mstrrest:request-param name="fields" value="id,owner"/> { "name": "new folder", "description": "description of a new folder", "parent": "58D0210140757B436A3EA09BB67B74DB" } </mstrrest:call> </z:log>

pdf:extract-images

Extracts images from a PDF resource.

Attributes

NameTypePossible ValuesDefault ValueDescription
pdf-nametextthe path of the file to be read from. As an alternative, binary data can be put inside as a child action.
read-passwordtextthe password of the input PDF if encrypted
pagestextfilter for specific pages of the input PDF; e.g. "3-8,12".
image-nametextfilter for specific image name obtained by action "pdf:list-resources".
formattextjpg
gif
png
bmp
jpgImage format.
target-folder-pathtextthe path to save the extracted images to.

Result Attributes

NameTypeDescription
rowcntnumbernumber of rows generated
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
nametextthe name of the actual image
formattextthe format of the resource (e.g. "png")
contentbinaryactual image data

Examples

<pdf:extract-images xmlns:pdf="http://zagreus.com/pdf" xmlns:kafka="http://zagreus.com/kafka" pdf-name="/users/testuser/<-filesystem->/pdf/input_encrypted.pdf" read-password="pass1" pages="2" target-folder-path="users/testuser/pdf/output-folder" format="bmp"/>

pdf:extract-text

Extracts text from a PDF resource.

Attributes

NameTypePossible ValuesDefault ValueDescription
pdf-nametextthe path of the file to be read from. As an alternative, binary data can be put inside as a child action.
read-passwordtextthe password of the input PDF if encrypted
pagestextfilter for specific pages of the input PDF; e.g. "3-8,12". Leaving it empty results in processing all pages

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<pdf:extract-text xmlns:pdf="http://zagreus.com/pdf" xmlns:kafka="http://zagreus.com/kafka" pdf-name="/users/testuser/<-filesystem->/pdf/input_encrypted.pdf" read-password="pass1" pages="2-5"/>

pdf:list-resources

Lists the resources (e.g. images) of a given PDF document. The resulting data can be used for e.g. saving the individual images by the "pdf:extract-images action.

Attributes

NameTypePossible ValuesDefault ValueDescription
pdf-nametextthe path of the file to be read from. As an alternative, binary data can be put inside as a child action.
read-passwordtextthe password of the input PDF if encrypted
pagestextfilters specific pages of the input PDF; e.g. "3-8,12"; only the related resources are listed.

Result Attributes

NameTypeDescription
sizetextPDF file size (in bytes)
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
nametextthe name of the actual resource
typetextthe type of the resource (e.g. "image")
pagenumberthe number of the page this resource relates to

Examples

<pdf:list-resources xmlns:pdf="http://zagreus.com/pdf" xmlns:kafka="http://zagreus.com/kafka" pdf-name="/users/testuser/<-filesystem->/in.pdf" read-password="hello" pages="3-5" log="true"/>

pdf:load

Loads a PDF from binary data with options of filtering and password handling.

Attributes

NameTypePossible ValuesDefault ValueDescription
pdf-nametextthe path of the file to be read from. As an alternative, binary data can be put inside as a child action.
read-passwordtextthe password of the input PDF if encrypted
pagestextfilters specific pages of the input PDF; e.g. "3-8,12"
encrypt-outputbooleanfalseIf true, the result PDF will be encrypted. By default, the original password (if any) is kept.
encrypt-passwordtextThe password used for encrypting the result PDF. Only works if attribute "encrypt-output" is set to true.

Result Attributes

NameTypeDescription
sizetextPDF file size (in bytes)
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf"> Reads a PDF file and writes pages 3, 4 and 5 to disk. </z:log> <pdf:load xmlns:pdf="http://zagreus.com/pdf" xmlns:kafka="http://zagreus.com/kafka" pdf-name="/users/testuser/<-filesystem->/in.pdf" pages="3-5" output="/users/testuser/<-filesystem->/out.pdf"/>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf"> Reads a PDF file and writes pages 3, 4 and 5 to disk, while keeping the original password protection. </z:log> <pdf:load xmlns:pdf="http://zagreus.com/pdf" xmlns:kafka="http://zagreus.com/kafka" pdf-name="/users/testuser/<-filesystem->/encrypted_with_password.pdf" read-password="hello" pages="3-5" encrypt-output="true" output="/users/testuser/<-filesystem->/out.pdf"/>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf"> Reads a PDF file and writes it to disk after removing password protection. </z:log> <pdf:load xmlns:pdf="http://zagreus.com/pdf" xmlns:kafka="http://zagreus.com/kafka" read-password="hello" encrypt-output="false" output="/users/testuser/<-filesystem->/decrypted.pdf"> <file:read filename="/users/testuser/<-filesystem->/encrypted_with_password.pdf" binary="true"/> </pdf:load>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf"> Changes the password of a PDF file. </z:log> <pdf:load xmlns:pdf="http://zagreus.com/pdf" xmlns:kafka="http://zagreus.com/kafka" pdf-name="/users/testuser/<-filesystem->/encrypted_with_password.pdf" read-password="old password" encrypt-output="true" encrypt-password="new password" output="/users/testuser/<-filesystem->/newly_encrypted_with_new_password.pdf"/>

pdf:merge

Merges several PDF documents into one PDF resource.

Attributes

NameTypePossible ValuesDefault ValueDescription
encrypt-passwordtextThe password used for encrypting the result PDF.

Result Attributes

NameTypeDescription
sizetextPDF file size (in bytes)
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription

Examples

<pdf:merge xmlns:pdf="http://zagreus.com/pdf" xmlns:kafka="http://zagreus.com/kafka" encrypt-password="new password" output="/users/testuser/<-filesystem->/merged-and-encrypted.pdf"> <pdf:load pdf-name="/users/testuser/<-filesystem->/in-encrypted.pdf" read-password="pass1" pages="3-5" encrypt-output="false"/> <file:read filename="/users/testuser/<-filesystem->/in-not-encrypted.pdf" binary="true"/> </pdf:merge>

pdf:to-image

Converts the pages of a PDF document to images.

Attributes

NameTypePossible ValuesDefault ValueDescription
pdf-nametextthe path of the file to be read from. As an alternative, binary data can be put inside as a child action.
read-passwordtextthe password of the input PDF if encrypted
pagestextfilter for specific pages of the input PDF; e.g. "3-8,12". If not set, all pages will be processed.
formattextjpg
gif
png
bmp
jpgImage format.
target-folder-pathtextthe path to save the extracted images to.
filenametextpagethe filename to save the extracted images as. If it contains a "\page" string, the actual page number will be substituted (e.g. "\pageth_page" leads to files "10th_page", "20th_page" etc.); otherwise the page number will be added to the end of the value to which this attribute was set.
leading-zerobooleanfalseIf set to true, the page numbers will be written with leading zeros (e.g. 001, 002). The number of digits will be adapted to the largest number of page saved; for example, exporting pages 1..99 with leading zeros will lead to "01", "02", ..., "99".
dpinumber300The DPI value for rendering the images.

Result Attributes

NameTypeDescription
sizetextPDF file size (in bytes)
execution_timenumbertime interval while the action is executed

Result Table

NameTypePossible ValuesDescription
nametextthe name of the actual image (page01, page02 etc.)
formattextthe format of the resource (e.g. "png")
contentbinaryactual image data

Examples

<pdf:to-image xmlns:pdf="http://zagreus.com/pdf" xmlns:kafka="http://zagreus.com/kafka" pdf-name="/admin/<-filesystem->/pdf/input.pdf" pages="3-5,8" target-folder-path="/admin/<-filesystem->/pdf/out" format="jpg" dpi="300" alias="x"/> <file:write xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" filename="/admin/<-filesystem->/pdf/out/test-standalone-page.jpg">${x[2].content}</file:write>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf">Export pages 1...50 and 100...1000; filenames will be "0001th_page", "0002th_page", ..., "0050th_page", "0100th_page" etc.</z:log> <pdf:to-image xmlns:pdf="http://zagreus.com/pdf" xmlns:kafka="http://zagreus.com/kafka" pdf-name="/admin/<-filesystem->/pdf/input.pdf" pages="1-50,100-1000" target-folder-path="/admin/<-filesystem->/pdf/out" format="png" dpi="300" filename="\pageth_page" leading-zero="true"/>
<z:log xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf">Export pages 1...50 and 100...1000; filenames will be "page_1", "page_2", ..., "page_50", "page_100", ..., "page_1000".</z:log> <pdf:to-image xmlns:pdf="http://zagreus.com/pdf" xmlns:kafka="http://zagreus.com/kafka" pdf-name="/admin/<-filesystem->/pdf/input.pdf" pages="1-50,100-1000" target-folder-path="/admin/<-filesystem->/pdf/out" format="png" dpi="300" filename="page_" leading-zero="false"/>

rest:call

Calls a REST API function.

Attributes

NameTypePossible ValuesDefault ValueDescription
api-pathtextthe (relative) API path, which will be appended to the base path defined in the rest:connection (e.g. /rest/api/2/project)
http-methodGET
POST
HEAD
PUT
DELETE
PATCH
the HTTP method used (e.g. GET, POST)
content-typetextapplication/json
application/octet-stream
application/pdf
application/zip
image/jpeg
image/gif
image/png
text/html
text/plain
type of the content
multipartbooleanfalseIf set, the body of the request will be handled as a multipart request. In this case, rest:part children are expected.

Result Attributes

NameTypeDescription
http_methodthe HTTP method of the rest call
rest_urlthe complete rest URL sent to the server
request_bodythe request body sent to the server in case of e.g. a POST call
request_parametersthe request parameters sent to the server in case of a GET or DELETE call
header_parametersthe HTTP header parameters sent to the server
http_response_codenumberthe HTTP response code received from the REST server

Result Table

NameTypePossible ValuesDescription

Examples

<rest:connection xmlns:rest="http://zagreus.com/rest" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" xmlns:jira="http://zagreus.com/jira" name="rest" url="https://dummy.atlassian.net"> <rest:header-param name="Authorization" value="Basic cG**********Q=="/> </rest:connection> <rest:call xmlns:rest="http://zagreus.com/rest" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" xmlns:jira="http://zagreus.com/jira" connection-name="rest" api-path="/rest/api/2/project" http-method="GET" log="true"/>
<rest:call xmlns:rest="http://zagreus.com/rest" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" xmlns:jira="http://zagreus.com/jira" url="https://dummy.atlassian.net/rest/api/2/project" http-method="GET" log="true"> <rest:header-param name="Authorization" value="Basic cG**********Q=="/> </rest:call>
<rest:call xmlns:rest="http://zagreus.com/rest" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" xmlns:jira="http://zagreus.com/jira" url="https://dummy.atlassian.net/rest/api/2/user/assignable/search" http-method="GET" log="true"> <rest:request-param name="project" value="JPR"/> <rest:header-param name="Authorization" value="Basic cG**********Q=="/> </rest:call>

rest:connection

Defines a REST connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
name*textname of the connection
url*textBase URL of the server with the REST service

Result Attributes

NameTypeDescription
execution_timenumbertime interval while the action is executed

Examples

<rest:connection xmlns:rest="http://zagreus.com/rest" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:jira="http://zagreus.com/jira" name="rest" url="https://dummy.atlassian.net"> <rest:header-param name="Authorization" value="Basic cG**********Q=="/> </rest:connection> <rest:call xmlns:rest="http://zagreus.com/rest" xmlns:kafka="http://zagreus.com/kafka" xmlns:pdf="http://zagreus.com/pdf" xmlns:jira="http://zagreus.com/jira" connection-name="rest" api-path="/rest/api/2/project" http-method="GET" log="true"/>

rest:header-param

Refers to a header parameter of the rest:call action

Attributes

NameTypePossible ValuesDefault ValueDescription
name*name of the header parameter
valuevalue of the header parameter

Examples

<rest:connection xmlns:rest="http://zagreus.com/rest" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" name="rest" url="https://dummy.atlassian.net"> <rest:header-param name="Authorization" value="Basic cG**********Q=="/> </rest:connection> <rest:call xmlns:rest="http://zagreus.com/rest" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" connection-name="rest" api-path="/rest/api/2/project" http-method="GET" log="true"/>
<rest:call xmlns:rest="http://zagreus.com/rest" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" url="https://dummy.atlassian.net/rest/api/2/user/assignable/search" http-method="GET" log="true"> <rest:request-param name="project" value="JPR"/> <rest:header-param name="Authorization" value="Basic cG**********Q=="/> </rest:call>

rest:part

Refers to a multipart item of the rest:call action in case when attribute multipart is set to true.

Attributes

NameTypePossible ValuesDefault ValueDescription
content-typecontent-type of the multipart item. If it is a binary, default value is "application/octet-stream". For textual input, it is not mandatory, and there is no default value

Examples

<rest:connection xmlns:rest="http://zagreus.com/rest" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" name="rest" url="https://dummy.atlassian.net"> <rest:header-param name="Authorization" value="Basic cG**********Q=="/> </rest:connection> <rest:call xmlns:rest="http://zagreus.com/rest" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" connection-name="rest" api-path="/rest/api/2/project" http-method="GET" log="true"/>
<rest:call xmlns:rest="http://zagreus.com/rest" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" url="https://dummy.atlassian.net/rest/api/2/user/assignable/search" http-method="GET" log="true"> <rest:request-param name="project" value="JPR"/> <rest:header-param name="Authorization" value="Basic cG**********Q=="/> </rest:call>
<rest:call xmlns:rest="http://zagreus.com/rest" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" url="https://graph.microsoft.com/v1.0/sites/1********7/drives/b********T/root://etixpert/sample.pdf:/content" http-method="PUT" multipart="true"> <rest:header-param name="Authorization" value="Basic cG**********Q=="/> <rest:header-param name="Accept" value="application/json"/> <rest:part filename="sample.pdf" content-type="application/json"> <file:read filename="/users/zagreus/<-filesystem->/sample.pdf" binary="true"/> </rest:part> </rest:call>

rest:request-param

Refers to a parameter of the rest:call action

Attributes

NameTypePossible ValuesDefault ValueDescription
name*name of the parameter
valuevalue of the parameter

Examples

<rest:call xmlns:rest="http://zagreus.com/rest" xmlns:mstrrest="http://zagreus.com/mstrrest" xmlns:kafka="http://zagreus.com/kafka" url="https://dummy.atlassian.net/rest/api/2/user/assignable/search" http-method="GET" log="true"> <rest:request-param name="project" value="JPR"/> <rest:header-param name="Authorization" value="Basic cG**********Q=="/> </rest:call>

ws:call

Calls a webservice.

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextname of the function to call
namespacetextnamespace of the webservice method
connection-nametextname of the connection
addresstextaddress of the webservice method
actiontext
ns-prefixtextnamespace prefix
result-formattextformat of the result

Result Attributes

NameTypeDescription
rowcntnumberthe number of rows returned (if output-type is "table")

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <ws:call connection-name="zagreus" name="getResource" namespace="http://axis.server.zagreus.etixpert.com"> <ws:param name="id" type="string"> 402881db15dcde930115dce288b00002 </ws:param> </ws:call> </z:log>

ws:connection

Creates a webservice connection.

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextname of the connection
servertextname of the server to connect
portnumbernumber of the port to connect
usertextname of the user
passwordtextpassword for the user
cpasswordtextencripted password for the user
wsdl-uritextpath of the WSDL file to use
addresstextthe address of the webservice
proxy-addresstextthe address of a proxy used. Format is address[:port]
proxy-typetextHTTP
SOCKS
DIRECT
HTTPthe type of the proxy.

Examples

<ws:connection xmlns:kafka="http://zagreus.com/kafka" name="zagreus" server="localhost" port="7323" user="admin" password="admin" cpassword="" wsdl-uri="http://localhost:7323/zagreus/zagreus_actions.wsdl"/> <ws:call xmlns:kafka="http://zagreus.com/kafka" name="runScript" namespace="http://axis.server.zagreus.etixpert.com" connection-name="zagreus" address="http://localhost:7323/zagreus/services/MainService"> <ws:param type="string" namespace="http://www.w3.org/2001/XMLSchema" name="scriptIdOrPath" null="false">255895317a254b3b95e5194d0f09d607</ws:param> <ws:param type="int" namespace="http://www.w3.org/2001/XMLSchema" name="sleep_time" null="false">1000</ws:param> </ws:call>

ws:param

Specified a parameter for webservice method calling.

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextname of the parameter
typetexttype of the parameter
ns-prefixtextnamespace of the parameter
nullbooleanif yes or true, the value will be handled as null value

Examples

<ws:connection xmlns:kafka="http://zagreus.com/kafka" name="zagreus" server="localhost" port="7323" user="admin" password="admin" cpassword="" wsdl-uri="http://localhost:7323/zagreus/zagreus_actions.wsdl"/> <ws:call xmlns:kafka="http://zagreus.com/kafka" name="runScript" namespace="http://axis.server.zagreus.etixpert.com" connection-name="zagreus" address="http://localhost:7323/zagreus/services/MainService"> <ws:param type="string" namespace="http://www.w3.org/2001/XMLSchema" name="scriptIdOrPath" null="false">255895317a254b3b95e5194d0f09d607</ws:param> <ws:param type="int" namespace="http://www.w3.org/2001/XMLSchema" name="sleep_time" null="false">1000</ws:param> </ws:call>

xslt:param

Specifies a parameter value for the xslt processor.

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextthe xslt parameter name

Result Table

NameTypePossible ValuesDescription

Examples

<xslt:transform xmlns:kafka="http://zagreus.com/kafka" output="x.xml" xsl="custom.xsl"> <xslt:param name="param_name">param value</xslt:param> <mstr:report connection-name="MSTR" id="..."/> </xslt:transform>

xslt:query

Executes an xquery expression on an xml resource.

Attributes

NameTypePossible ValuesDefault ValueDescription
xquerytextthe xquery expression
omit-xml-declarationbooleantrueif "true", the starting xml declaration tag will be omitted

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <xslt:query xquery="/table/tr[2]/td[1]"> <file:read filename="sample.xml"/> </xslt:query> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <xslt:query xquery="for $$x in //td return $$x/text()"> <file:read filename="sample.xml"/> </xslt:query> </z:log>
<table xmlns:kafka="http://zagreus.com/kafka"> <tr> <th>ID</th><th>NAME</th> </tr> <tr> <td>2</td><td>Condiments</td> </tr> <tr> <td>3</td><td>Confections</td> </tr> <tr> <td>4</td><td>Dairy Products</td> </tr> <tr> <td>5</td><td>Grains/Cereals</td> </tr> <tr> <td>6</td><td>Meat/Poultry</td> </tr> <tr> <td>7</td><td>Produce</td> </tr> <tr> <td>8</td><td>Seafood</td> </tr> </table>

xslt:transform

Transforms the content by using the specified xslt file. Parameters can be set by the xslt:param action.

Attributes

NameTypePossible ValuesDefault ValueDescription
xsltextthe XSLT file name that transforms the source XML
xsl-valuetextXSLT code that transforms the source XML
write-xml-headerbooleantrueif "true", a standard header will be included in the result XML
mergingbooleanfalse if "true", the source XML files are merged
encodingtextISO-8859-1
ISO-8859-2
UTF-8
UTF-16
UTF-32
UTF-16LE
UTF-16BE
UTF-32LE
UTF-32BE
The used encoding for the XSLT file.

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<files xmlns:kafka="http://zagreus.com/kafka"> <file id="1">...first source ...</file> <file id="2">...second source ...</file> ... <file id="n">...n-th source ...</file> </files>
<xslt:transform output="x.fo" xsl="mstr2fo.xsl"> <mstr:report connection-name="MSTR" id="..."/> </xslt:transform>
<xslt:transform xmlns:kafka="http://zagreus.com/kafka" output="x.fo" xsl="custom.xsl" merging="true"> <mstr:report connection-name="MSTR" id="..."/> <mstr:report connection-name="MSTR" id="..."/> </xslt:transform>
<xslt:transform xmlns:kafka="http://zagreus.com/kafka" output="x.xml" xsl="custom.xsl"> <xslt:param name="param_name">param value</xslt:param> <mstr:report connection-name="MSTR" id="..."/> </xslt:transform>
<z:variable xmlns:kafka="http://zagreus.com/kafka" name="xslt" monitor="false" scope="local">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;&gt; &lt;xsl:template match="/"&gt; &lt;xsl:variable name="result"&gt; &lt;xsl:for-each select="catalog/cd[year &amp;gt; 1985]"&gt; &lt;xsl:sort data-type="text" order="descending"/&gt; &lt;xsl:if test="position()=last()"&gt; &lt;xsl:value-of select="title"/&gt; &lt;/xsl:if&gt; &lt;/xsl:for-each&gt; &lt;/xsl:variable&gt; &lt;xsl:value-of select="$$result" /&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt;</z:variable> <xslt:transform xmlns:kafka="http://zagreus.com/kafka" xsl="" xsl-value="$xslt" write-xml-header="false" merging="false" alias="x">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;catalog&gt; &lt;cd&gt; &lt;title&gt;Empire Burlesque&lt;/title&gt; &lt;artist&gt;Bob Dylan&lt;/artist&gt; &lt;country&gt;USA&lt;/country&gt; &lt;company&gt;Columbia&lt;/company&gt; &lt;price&gt;10.90&lt;/price&gt; &lt;year&gt;1985&lt;/year&gt; &lt;/cd&gt; &lt;/catalog&gt;</xslt:transform>

z:alias

Defines a variable with a given name. The variable value will be set to the evaluated value of the content. Alias is the synonym of "variable".

Attributes

NameTypePossible ValuesDefault ValueDescription
name*textthe name of the variable
monitorbooleanfalseif "true", the variable can be monitored in real-time by the Zagreus Monitor
scopetextlocal
global
localthe scope of the variable

Examples

<z:variable xmlns:kafka="http://zagreus.com/kafka" name="x">outer</z:variable> <z:block xmlns:kafka="http://zagreus.com/kafka"> <z:variable name="x">inner</z:variable> <z:log>inner variable: $x</z:log> </z:block> <z:log xmlns:kafka="http://zagreus.com/kafka">outer variable: $x</z:log>
<z:alias xmlns:kafka="http://zagreus.com/kafka" name="y"> <z:parse row-separator=";" column-separator="," header="true">br_id,x;A,1;B,2;C,3;D,4;E,5</z:parse> </z:alias>
<z:alias xmlns:kafka="http://zagreus.com/kafka" name="exceldata"> <excel:read filename="user.xls" sheet="user" header="true"/> </z:alias>
<z:block xmlns:kafka="http://zagreus.com/kafka"> <z:alias name="x" scope="global">X</z:alias> </z:block> <z:log xmlns:kafka="http://zagreus.com/kafka">We output X: $x</z:log>

z:array

Creates an associated array from its content. The items of the generated array can be accessed by using their index or, if the source item action has an alias attribute, this alias can be used as an identifier.

Attributes

NameTypePossible ValuesDefault ValueDescription

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<z:array xmlns:kafka="http://zagreus.com/kafka" alias="test_array"> <z:alias name="1">${number(11)}</z:alias> <z:alias name="2">abc</z:alias> <z:alias name="3">${number(1.34)}</z:alias> <z:alias name="4">2008-01-01</z:alias> <z:alias name="5">13:23:33.000</z:alias> <z:alias name="6">2009-01-01 14:23:33</z:alias> </z:array> <z:log xmlns:kafka="http://zagreus.com/kafka">${test_array.'1'}</z:log>
<z:array xmlns:kafka="http://zagreus.com/kafka" alias="values_en" number-language-format="en" number-format="${['x':'#0,000','y':'#00.00', 'z':'#']}"> <z:alias name="x">1234</z:alias> <z:alias name="y">1234</z:alias> <z:alias name="z">1234</z:alias> </z:array> <z:array xmlns:kafka="http://zagreus.com/kafka" alias="values_de" number-language-format="de" number-format="${['x':'#0,000','y':'#00.00', 'z':'#']}"> <z:alias name="x">1234</z:alias> <z:alias name="y">1234</z:alias> <z:alias name="z">1234</z:alias> </z:array> <z:log xmlns:kafka="http://zagreus.com/kafka">$values_en,$values_de</z:log>

z:block

Encapsulates further Zagreus actions; can be used to define logical levels within a script. Also affects the visibility of variables.

Examples

<z:block xmlns:kafka="http://zagreus.com/kafka"> <z:on-error error-name=""> <z:log>error value=${error.z_system.exit_value}</z:log> </z:on-error> <z:system>dir x</z:system> </z:block>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:block number-format="00.###E0">${1234}</z:block> </z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:block number-format="00.###E0">${number('1,234', '#,###.0')}</z:block> </z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:block date-format="dd/MM/yy">${date('1972-03-02')}</z:block> </z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:block time-format="hh-mm-ss">${time('12:24:36.123')}</z:block> </z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:block date-format="dd/MM/yy" number-format="00.###E0" time-format="hh-mm-ss">${[[1,2,3],[4,5,6]]}</z:block> </z:log>

z:break

Breaks the current loop processing in actions z:while, z:foreach, z:for. Calling this action will finish the execution of the closest ancestor loop.

Examples

<z:foreach xmlns:kafka="http://zagreus.com/kafka" key="a" in="${[1,2,3,4,5,6,7]}"> <z:if test-expr="a=4"> <z:then> <z:break/> </z:then> </z:if> <z:log>$a</z:log> </z:foreach>

z:call-template

Calls a template defined by the z:template action. The values of the contained z:param subactions will be propagated as actual parameters of the template.

Attributes

NameTypePossible ValuesDefault ValueDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka">Calling template "X2"</z:log> <z:call-template xmlns:kafka="http://zagreus.com/kafka" name="X2"> <z:param name="x">1</z:param> <z:param name="y">2</z:param> </z:call-template>

z:case

Executes its content when its specified value matches its parent action z:switch test expression

Attributes

NameTypePossible ValuesDefault ValueDescription
value*textexpression that is compared with the test expression.
value-reg*textregular expression that is compared with the test expression.

Examples

<z:variable xmlns:kafka="http://zagreus.com/kafka" name="x">b</z:variable> <z:log xmlns:kafka="http://zagreus.com/kafka">Testing switch statement</z:log> <z:switch xmlns:kafka="http://zagreus.com/kafka" test-expr="x"> <z:case value="a"> <z:log>case a</z:log> </z:case> <z:case value="b"> <z:log>case b</z:log> </z:case> <z:case value="c"> <z:log>case c</z:log> </z:case> <z:else> <z:log>else</z:log> </z:else> </z:switch>

z:cast

Converts the content to a different data type. For tables and records, the individual columns might be treated differently, specified either by the "columns" attribute, or the "z:column" child action

Attributes

NameTypePossible ValuesDefault ValueDescription
type*textboolean
date
number
text
time
auto
The data type to be cast to. If the affected columns are also specified, then multiple data types can be listed (separated by ";"s), but this number must match the number of columns set.
columns*textIf the input is a table or a record, the affected columns / fields can be specified (separated by ";"s)
autodetect-typebooleanfalseIf set to true, all values will be autodetected to the supported types (i.e. null, boolean, number, date, time or text), based on the actual individual value. For tables and records, the columns specified in the "columns" attribute or in the z:column child action are exceptions to this rule
input-number-formattextThe format used for parsing numbers; applies for all numeric columns
input-localetextThe locale used for parsing numbers (e.g. "de", "en", "at"); applies for all numeric columns
input-date-formattextThe format used for parsing dates; applies for all date columns

Result Attributes

NameTypeDescription
rowcntnumbernumber of rows generated
execution_timenumberthe length of time the action was executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka">Cast all columns to numbers</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:cast type="number"> <z:parse row-separator=";" column-separator="," header="true">a,b,c;01,02,03;04,05,00;07,08,00009</z:parse> </z:cast> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka">Cast the first two columns to numbers</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:cast columns="a,b" type="number"> <z:parse row-separator=";" column-separator="," header="true">a,b,c;01,02,03;04,05,00;07,08,00009</z:parse> </z:cast> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka">Autodetects all columns</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:cast type="auto"> <z:parse row-separator=";" column-separator="," header="true">a,b,c;01,02,03;04,05,00;07,08,00009</z:parse> </z:cast> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka">Autodetects all columns</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:cast autodetect-type="true"> <z:parse row-separator=";" column-separator="," header="true">a,b,c;01,02,03;04,05,00;07,08,00009</z:parse> </z:cast> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka">Autodetects all columns except "a", which is left as text</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:cast autodetect-type="true" columns="a" type="text"> <z:parse row-separator=";" column-separator="," header="true">a,b,c;01,02,03;04,05,00;07,08,00009</z:parse> </z:cast> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka">Autodetects all columns except "a", which is left as text</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:cast autodetect-type="true"> <z:column column="a" type="text"/> <z:parse row-separator=";" column-separator="," header="true">a,b,c;01,02,03;04,05,00;07,08,00009</z:parse> </z:cast> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka">cast list of columns with different types</z:log> <z:cast xmlns:kafka="http://zagreus.com/kafka" _o="3" _x="191" _y="347" _w="260" _h="416" _v="0" _s="false" type="boolean;date" columns="four;two" autodetect-type="false" alias="y" _z="2"> <z:parse row-separator="\n" column-separator=";" column-names="" fixed-fields="" header="true" type="" _o="3.1" _x="0" _y="37" _w="240" _h="268" _v="0" alias="x" _z="0">one;two;three;four;five 01;2021-12-25; Hello Zagreus!;true;12.36 02;2021-12-25;Hello Zagreus!;true;12.36 03;2021-12-25;Hello Zagreus!;true;51.36 04;2021-12-25;Hello Zagreus!;false;58.36</z:parse> </z:cast> <z:log xmlns:kafka="http://zagreus.com/kafka" level="" null-format="null" _z="3" _o="4" _x="481" _y="352" _w="419" _h="143" _v="0">type of column two: ${gettype(y[1].two)} type of column four: ${gettype(y[1].four)} type of column five : ${gettype(y[1].five)} =&gt; untouched column which contains digits</z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka">cast one input column to date and change date-format in one step</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka" level="" null-format="null" _z="0" _o="1" _x="78" _y="49" _w="257" _h="565" _v="0"> <z:cast _o="1.1" _x="0" _y="20" _w="247" _h="472" _v="0" _s="false" type="date" columns="two" autodetect-type="false" input-number-format="" input-locale="" input-date-format="dd.MM.yyyy" alias="x" date-format="yyyy-MM-dd hh:mm:ss" _z="0"> <z:parse row-separator="\n" column-separator=";" column-names="" fixed-fields="" header="true" type="" _o="1.1.1" _x="7" _y="17" _w="230" _h="268" _v="0" alias="x" _z="0">one;two;three;four;five 01;31.01.2023;Hello Zagreus!;true;12.36</z:parse> </z:cast> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka">z:cast with number format</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka" level="" null-format="null" _z="0" _o="1" _x="110" _y="56" _w="259" _h="581" _v="0"> <z:cast _o="1.1" _x="0" _y="30" _w="249" _h="478" _v="0" _s="false" type="number" columns="one;five" autodetect-type="false" alias="y" input-locale="en" input-number-format="###,###.000" _z="0"> <z:parse row-separator="\n" column-separator=";" column-names="" fixed-fields="" header="true" type="" _o="1.1.1" _x="0" _y="61" _w="239" _h="268" _v="0" alias="x" _z="0">one;two;three;four;five 001,999.8;31.01.2023;Hello Zagreus!;true;12.36</z:parse> </z:cast> </z:log>

z:column

Specifies column information for the "z:cast" parent action

Attributes

NameTypePossible ValuesDefault ValueDescription
name*textIf name of the column
type*textboolean
date
number
text
time
auto
The data type to be cast to
input-number-formattextThe format used for parsing numbers; applies for all numeric columns
input-localetextThe locale used for parsing numbers (e.g. "de", "en", "at"); applies for all numeric columns
input-date-formattextThe format used for parsing dates; applies for all date columns

Result Attributes

NameTypeDescription
rowcntnumbernumber of rows generated
execution_timenumberthe length of time the action was executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka">Autodetects all columns except "a", which is left as text</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:cast autodetect="true"> <z:column column="a" type="text"/> <z:parse row-separator=";" column-separator="," header="true">a,b,c;01,02,03;04,05,00;07,08,00009</z:parse> </z:cast> </z:log>

z:compare

Compares the results of the first 2 child actions. Comparing is done in row-oriented way like unix command "diff". The result is a boolean value indicating whether the two compared things are the same or no; the actual differences are stored in a result attribute.

Result Attributes

NameTypeDescription
differencestexta list of differences, each entry in this list is a pair of the corresponding intervals where the difference was found
countnumbernumber of differences (the size of the differences list)
execution_timenumberthe length of time the action was executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:compare> <z:text>a b c</z:text> <z:text>a b d</z:text> </z:compare> </z:log> <z:log xmlns:kafka="http://zagreus.com/kafka">$z_compare</z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:compare> <z:parse row-separator=";" column-separator="," header="true">a,b,c;1,2,3;4,5,6</z:parse> <z:parse row-separator=";" column-separator="," header="true">a,b,c;1,2,3;5,5,6</z:parse> </z:compare> </z:log> <z:log xmlns:kafka="http://zagreus.com/kafka">$z_compare</z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:compare> <file:read filename="in.pdf" binary="true"/> <file:read filename="out.pdf" binary="true"/> </z:compare> </z:log> <z:log xmlns:kafka="http://zagreus.com/kafka">$z_compare</z:log>

z:continue

Breaks the current loop processing in actions z:while, z:for and z:foreach and proceeds with the next element. Calling this action will finish the execution of the closest ancestor loop.

Examples

<z:foreach xmlns:kafka="http://zagreus.com/kafka" key="element"> <z:in> <z:parse row-separator="\n" column-separator=";" header="true">Father;Son Poseidon;Theseus Poseidon;Triton Zeus;Zagreus Hera;Angelos</z:parse> </z:in> <z:block> <z:log>${z_foreach.counter}: Father: ${element.Father} -&gt; Son: ${element.Son}</z:log> <z:if test-expr="element.Son='Zagreus'"> <z:then> <z:continue/> </z:then> </z:if> <z:log>here</z:log> </z:block> </z:foreach>

z:decode

Decodes the content. The input and the optional further parameters (key and iv) can be binary or text; another option is to specify them in a hexadecimal format, using the "hex:" prefix (e.g. "hex:06FF")

Attributes

NameTypePossible ValuesDefault ValueDescription
methodtextBASE64
AES-256 or AES-256-CBC
BASE64method used for decoding
result-typetexttext
binary
BASE64
hex
textthe format of the decrypted result
keytext/binarythe key for the AES-256 decryption
ivtext/binarythe iv for the AES-256 decryption
encodingtextcharacter encoding of the input/output strings (if any)

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:decode method="AES-256" key="hex:b38b730d4cc721156e3760d1d58546ce697adc939188e4c6a80f0e24e032b9b7" iv="hex:064df9633d9f5dd0b5614843f6b4b059" result-type="text"> <z:encode method="AES-256" key="hex:b38b730d4cc721156e3760d1d58546ce697adc939188e4c6a80f0e24e032b9b7" iv="hex:064df9633d9f5dd0b5614843f6b4b059" result-type="binary">Zagreus</z:encode> </z:decode> </z:log>
<z:decode xmlns:kafka="http://zagreus.com/kafka" method="BASE64">WmFncmV1cw==</z:decode>

z:difference

Generates the (set-like) difference of the result of subcontents; i.e. the result will contain those elements of the first subcontent which are not present in the second one. Designed to work well for tables, lists, records and texts.

Attributes

NameTypePossible ValuesDefault ValueDescription
symmetricbooleanfalseIf true, the result will contain the elements of both sets which are not present in the other; if false, the result will contain only the elements of the first subcontent which are not present in the second one.

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:difference> <z:parse row-separator=";" column-separator="," header="true" alias="f1">a,b,c;1,2,3;4,5,6;7,8,9 </z:parse> <z:parse row-separator=";" column-separator="," header="true" alias="f2">a,b,c;1,2,3;9,8,7 </z:parse> </z:difference> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:difference symmetric="true"> <z:text>lineone linetwo linethree</z:text> <z:text>linetwo linethree linefour</z:text> </z:difference> </z:log>

z:do-while

Executes the enclosing content while the test condition is evaluated as true (but at least once). Execution can be stopped by calling action "z:break".

Attributes

NameTypePossible ValuesDefault ValueDescription
test-expr*textloop condition expression
loop-countertextspecifies the name of the implicit variable which is used for counting the loops. If set, this variable is changing its value in every loop cycle.
monitor-counterbooleanfalseif set to true, the loop counter variable will be set as a monitoring variable

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed
loopcntnumberthe total count the loop was executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka">Testing do-while statement</z:log> <z:variable xmlns:kafka="http://zagreus.com/kafka" name="i">${number(0)}</z:variable> <z:do-while xmlns:kafka="http://zagreus.com/kafka" test-expr="${10 > i}"> <z:log>${i}</z:log> <z:block>${i:=i+1}</z:block> </z:do-while>

z:documentation

Creates a documentation of the specified script in pdf format.

Attributes

NameTypePossible ValuesDefault ValueDescription
filename*textthe location of the source script
versiontextthe version of the source script
justiconbooleanfalsedraw just icons for the main script
graphviewbooleantrueshould we draw the hierarchical structure
graphpagetextA4portrait
A4landscape
A3portrait
A3landscape
A4portraitthe page type of the hierarchical structure
graphsizetextnormal
small
tiny
normalthe size of the icons in the hierarchical structure
display-levelnumberuntil which level should we draw the elements in the details view. They all will be listed, however
elementstextwe also draw these elements in the details view, regardless of the value of "display-level"
header-lefttextZagreus v#{zagreusversion}left header of a page
header-centertext#{scriptname}center header of a page
header-righttext#{logo}right header of a page
footer-lefttext© Etixpert GmbH.left footer of a page
footer-centertext#{page} of #{numpages}center footer of a page
footer-righttext#{date}right footer of a page
zagreus-versiontext1.5the version of Zagreus
include-xmlbooleantrueshould we also include the XML source

Examples

<z:documentation xmlns:kafka="http://zagreus.com/kafka" filename="/admin/importantscript" version="1.0.0.1"/>

z:else

Defines an else block inside a z:if statement

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka">Testing if statement</z:log> <z:variable xmlns:kafka="http://zagreus.com/kafka" name="x">2</z:variable> <z:if xmlns:kafka="http://zagreus.com/kafka" test-expr="x < 2"> <z:then> <z:log>Then Part</z:log> </z:then> <z:else> <z:log>Else Part</z:log> </z:else> </z:if>

z:encode

Encodes the content. The input and the optional further parameters (key and iv) can be binary or text; another option is to specify them in a hexadecimal format, using the "hex:" prefix (e.g. "hex:06FF")

Attributes

NameTypePossible ValuesDefault ValueDescription
methodtextBASE64
AES-256 or AES-256-CBC
BASE64method used for encoding
result-typetextbinary
BASE64
hex
binarythe format of the encrypted result
keytext/binarythe key for the AES-256 encryption
ivtext/binarythe iv for the AES-256 encryption
encodingtextcharacter encoding of the input/output strings (if any)

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:encode method="AES-256" key="hex:b38b730d4cc721156e3760d1d58546ce697adc939188e4c6a80f0e24e032b9b7" iv="hex:064df9633d9f5dd0b5614843f6b4b059" result-type="base64">hex:61</z:encode> </z:log>
<z:encode xmlns:kafka="http://zagreus.com/kafka" method="AES-256"> <file:read filename="/admin/<-filesystem->/in.bin" binary="true"/> </z:encode>
<z:encode xmlns:kafka="http://zagreus.com/kafka" method="BASE64" alias="varname">Zagreus</z:encode>

z:eval

Evaluates the content of the action as a script. Operates similarly to the "eval" function.

Examples

<z:variable xmlns:kafka="http://zagreus.com/kafka" name="logaction"> <z:text>$${</z:text> <z:text>1 + </z:text> <z:text>2 * 3</z:text> <z:text>}</z:text> </z:variable> <z:log xmlns:kafka="http://zagreus.com/kafka">${logaction}</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:eval>${logaction}</z:eval> </z:log>

z:exit

Exits from the execution engine. The content of the action or the value of the "message" attribute will be propagated to the server as the return value.

Attributes

NameTypePossible ValuesDefault ValueDescription
messagetextthe result message of the script. When set to "invisible", the job will not be listed in Finished jobs list or in the Monitor.
statustextfinished
error
cancelled
finishedthe intended status of the executed job

Examples

<z:exit xmlns:kafka="http://zagreus.com/kafka">This is the return value</z:exit>
<z:exit xmlns:kafka="http://zagreus.com/kafka" message="This is the return value" status="error"/>

z:filter

Selects the items from its contained iterable data that matches the specified selection expression. Some characters ("\", "*", "(" and ")") must be escaped with "\". E.g.: "(Q1)" can be used in where-expr as "\(Q1\)".

Attributes

NameTypePossible ValuesDefault ValueDescription
selecttextSelect and/or rename columns of the data (works only on tables). The supported format is the comma separated list of column specifiers. Column specifier is the name of the column, and here it is possible to rename the column name using the format "new_name = old_name".
keytextthisname of the variable that refers to the current item
where-exprtextthe selection expression
row-separatortextrow separator character when parsing multi-line texts
distinctbooleanif "true", the action returns only distinct (different) items

Result Attributes

NameTypeDescription
rowcntnumbernumber of rows selected
execution_timenumberthe length of time the action was executed

Examples

<z:filter xmlns:kafka="http://zagreus.com/kafka" select="" key="figure" where-expr="figure>=3" row-separator="," alias="filtered" distinct="true">1,2,3,4,5,5,5</z:filter>
<z:filter xmlns:kafka="http://zagreus.com/kafka" select="Son of Zeus=Son" key="gods" where-expr="gods.Father inlist ['Zeus','Kronos']" row-separator="" alias="filtered"> <z:parse row-separator="\n" column-separator=";" header="true" type=""> Father;Son Zeus;Zagreus Zeus;Ares Zeus;Hephaistos Kronos;Zeus Anchises;Aeneas </z:parse> </z:filter>
<z:filter xmlns:kafka="http://zagreus.com/kafka" select="" key="s" where-expr="s.type='script'" row-separator="" distinct="false" alias="scripts"> <file:dir path="/users/demo" filename="" details="true" recursive="true"/> </z:filter>
<z:filter xmlns:kafka="http://zagreus.com/kafka" select="" key="s" where-expr="s.'address-value' ~ '@company.com' AND s.subject ~ 'Budget \(Q1\)'" row-separator="" distinct="false"> <mstr:subscriptionlist connection-name="demo" id="" name="" subscription-id="" subscription-name="" type="" format="" recipient="" owner="demouser" trigger-id="" trigger-name=""/> </z:filter>

z:fire-event

Sends an event to the Zagreus server.

Attributes

NameTypePossible ValuesDefault ValueDescription
event-id*textthe identifier of the event to fire

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<z:for-each xmlns:kafka="http://zagreus.com/kafka" key="event" in="$events"> <z:fire-event event-id="$event"/> </z:for-each>

z:for

Defines a for loop. Only operates with integer values. Execution can be stopped by calling action "z:break", and "z:continue" is handled as usual.

Attributes

NameTypePossible ValuesDefault ValueDescription
loop-counter*textloop counter variable name
from*numbernumeric value where the for loop initiates
to*numbernumeric value where the for loop ends
stepnumber1numeric value for the step size
monitor-counterbooleanfalseif set to true, the loop counter variable will be set as a monitoring variable

Result Attributes

NameTypeDescription
loopcntnumberthe total count the loop was executed
execution_timenumberthe length of time the action was executed

Examples

<z:for xmlns:kafka="http://zagreus.com/kafka" loop-counter="i" from="1" to="10"> <z:log>$i</z:log> </z:for>
<z:parse xmlns:kafka="http://zagreus.com/kafka" column-separator="," alias="stuff"> <file:read filename="test.txt"/> </z:parse> <z:for xmlns:kafka="http://zagreus.com/kafka" loop-counter="i" from="10" to="1" step="-3"> <z:log>${stuff[i]}</z:log> </z:for>

z:foreach

Executes the enclosing content on all items of an iterable expression. Execution can be stopped by calling action "z:break". When performing parallel execution, the id of the actual thread can be accessed by the inner variable "parallelThreadId".

Attributes

NameTypePossible ValuesDefault ValueDescription
in*textThe iterable expression. Instead of an attribute, a nested action "z:in" can also be used (see the examples).
key*textthe name of the variable that will refer to the current item
parallelnumber1the number of parallel executable loop items
loop-countertextspecifies the name of the implicit variable which is used for counting the loops. If set, this variable is changing its value in every loop cycle.
monitor-counterbooleanfalseif set to true, the loop counter variable will be set as a monitoring variable

Result Attributes

NameTypeDescription
loopcntnumberthe total count the loop was executed
execution_timenumberthe length of time the action was executed

Examples

<zip:file xmlns:kafka="http://zagreus.com/kafka" output="icons.zip"> <z:foreach key="filename"> <z:in> <file:dir path="icons" output="afile.txt"/> </z:in> <zip:item filename="$filename"> <file:read filename="icons/$filename" binary="true"/> </zip:item> </z:foreach> </zip:file>
<z:log xmlns:kafka="http://zagreus.com/kafka">Testing for-each</z:log> <z:foreach xmlns:kafka="http://zagreus.com/kafka" key="x"> <z:in> <z:parse column-separator=","> <file:read filename="test.txt"/> </z:parse> </z:in> <z:log>loop: $x, ${x[1]}</z:log> </z:foreach>
<mail:getmsg xmlns:kafka="http://zagreus.com/kafka" connection-name="imap-gmail" folder="INBOX" idx="1" delete="false" fetch-content="true" alias="email"/> <z:foreach xmlns:kafka="http://zagreus.com/kafka" key="attach"> <z:in>${email.attachments}</z:in> <file:write filename="${email.subject}.zip" append="false">${attach.content}</file:write> </z:foreach>
<z:foreach xmlns:kafka="http://zagreus.com/kafka" key="x" in="${['a','b','c','d']}" loop-counter="i"> <z:log>${i}: ${x}</z:log> </z:foreach>

z:format

Transforms the contained data to formatted textual representation.

Attributes

NameTypePossible ValuesDefault ValueDescription
typetexttext
ini
xml
html
textformat specifier
row-separatortextrow separator character
column-separatortextcolumn separator character
headerbooleanfalseif "false", the header information will not be generated

Examples

<z:parse xmlns:kafka="http://zagreus.com/kafka" alias="x" column-separator=";" header="true"> <file:read filename="x.dat"/> </z:parse> <z:log xmlns:kafka="http://zagreus.com/kafka">displaying and saving data in text </z:log> <z:log xmlns:kafka="http://zagreus.com/kafka">log action uses text format implicitly: $x</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:format output="data.xml" type="text">$x</z:format> </z:log> <z:log xmlns:kafka="http://zagreus.com/kafka">displaying and saving data in xml</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:format output="data.xml" type="xml">$x</z:format> </z:log> <z:log xmlns:kafka="http://zagreus.com/kafka">displaying and saving data in html</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:format output="data.xml" type="xml">$x</z:format> </z:log>
<z:format xmlns:kafka="http://zagreus.com/kafka" type="text" header="true" output="date2.txt" date-format="dd/MM/yyyy"> <db:sql connection-name="oracle" date-format="dd/MM/yyyy">select sysdate from dual</db:sql> </z:format>

z:head

Filters the result of the child actions to keep only the first N lines. If the input is a list, then it keeps the first N elements. If the skip attribute is set, then the first given number of lines are ignored.

Attributes

NameTypePossible ValuesDefault ValueDescription
linesnumber10the number of lines to keep
skipnumber0the number of lines which will be skipped from the start of the input

Result Attributes

NameTypeDescription
rowcntnumbernumber of rows generated
execution_timenumberthe length of time the action was executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:head lines="4"> <z:text>a b c</z:text> <z:text>a b d</z:text> </z:head> </z:log> <z:log xmlns:kafka="http://zagreus.com/kafka">$z_head</z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> Log out "b, c, a" <z:head lines="3" skip="1"> <z:text>a b c</z:text> <z:text>a b d</z:text> </z:head> </z:log> <z:log xmlns:kafka="http://zagreus.com/kafka">$z_head</z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> Log out: 2, ... 14, 15 (i.e. ALL lines except the first one) <z:head skip="1"> <z:text>1 2 3 4 5 6 7 8 9 10 11 12 13 14 15</z:text> </z:head> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:head lines="25"> <file:read filename="TestData.txt" binary="false"/> <file:read filename="tmp_q1_movies.txt" binary="false"/> </z:head> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:head lines="20"> <file:dir path="/users/zagreus_test/folder1" details="true"/> </z:head> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> Log out: 1 2 3 and a b c (z:parse gives a Zagreus table with keys 1, 2 and 3; and we keep the first entry of it, which is a b c) <z:head lines="1"> <z:parse row-separator="\n" column-separator=";" header="false">a;b;c d;e;f g;h;i</z:parse> </z:head> </z:log>

z:if

Executes one of its enclosed subactions "z:then" or "z:else" depending on the test condition.

Attributes

NameTypePossible ValuesDefault ValueDescription

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka">Testing if statement</z:log> <z:variable xmlns:kafka="http://zagreus.com/kafka" name="x">2</z:variable> <z:if xmlns:kafka="http://zagreus.com/kafka" test-expr="x < 2"> <z:then> <z:log>Then Part</z:log> </z:then> <z:else> <z:log>Else Part</z:log> </z:else> </z:if>
<z:array xmlns:kafka="http://zagreus.com/kafka" alias="tabelle"/> <z:variable xmlns:kafka="http://zagreus.com/kafka" name="i">${number(0)}</z:variable> <z:foreach xmlns:kafka="http://zagreus.com/kafka" key="row"> <z:in> <z:parse row-separator="\n" column-separator="\n" column-names="text" fixed-fields="" header="false"> <file:read filename="eini.txt"/> </z:parse> </z:in> <z:log>$row</z:log> ${tabelle[i] := row.text; i := i + 1;} <z:if test-expr="row.text=&quot;&quot;"> <z:then> <z:log>empty line</z:log> </z:then> </z:if> </z:foreach> <z:log xmlns:kafka="http://zagreus.com/kafka">$tabelle</z:log>

z:include

Includes and executes the content of a specified script file.

Attributes

NameTypePossible ValuesDefault ValueDescription
filename*textthe location of the script file

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka">Include predefined templates</z:log> <z:include xmlns:kafka="http://zagreus.com/kafka" filename="templates.xml"/>
<z:if xmlns:kafka="http://zagreus.com/kafka" test-expr="${x=1}"> <z:then> <z:include filaname="then_part.xml"/> </z:then> <z:else> <z:include filename="else_part.xml"/> </z:else> </z:if>

z:intersection

Generates the (set-like) intersection of the result of subcontents. Designed to work well for tables, lists, records and texts.

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:intersection> <z:parse row-separator=";" column-separator="," header="true" alias="f1">a,b,c;1,2,3;4,5,6;7,8,9 </z:parse> <z:parse row-separator=";" column-separator="," header="true" alias="f1">a,b,c;1,2,3;9,8,7 </z:parse> </z:intersection> </z:log>

z:java

Calls an external java method. The specified method should be static, should have String[] as input parameter. When calling, the results of the z:param subactions of the z:java action will be passed as parameters. If z:param is specified with name, the name, starting with a dash symbol will be inserted before the value. The result of the action will be the text value that converted from the result of the method call.

Attributes

NameTypePossible ValuesDefault ValueDescription
class*textthe class name. The specified class should be accessible for the engine, so the jar file that contains it should be in a folder that configured as classpath folder
methodtextexecutethe method name in the specified class. The method should be static, and only have one String[] argument

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:java class="test.Test" method="main"> <z:param>Hello</z:param> <z:param>World</z:param> </z:java> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka">Sample with param names</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:java class="test.Test" method="main"> <z:param name="message">Hello</z:param> <z:param name="target">World</z:param> </z:java> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka">The code above is equivalent to this code</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:java class="test.Test" method="main"> <z:param>-message</z:param> <z:param>Hello</z:param> <z:param>-target</z:param> <z:param>World</z:param> </z:java> </z:log>

z:join

Joins the information of its subactions. The limit for joining 2 tables with 4GB worker memory is the following (for both tables table): input table size is ca. 400 MB with c.a. 1.000.000 rows and 16 columns where one row contains ca. 400 bytes information (e.g. one ID column with integers and each other columns contain 27 characters)

Attributes

NameTypePossible ValuesDefault ValueDescription
select*textSelect and/or rename columns of the data (works only on tables). The supported format is the comma separated list of column specifiers. Column specifier is the name of the column, and here it is possible to rename the column name using an alias. Both "alias = column_reference" and "column_reference = alias" works; the one which does not contain a dot will be handled as the alias. Note that it is not checked whether the referenced columns indeed exist in the input tables; if not, then these will be handled as missing values, which might lead to an empty result.
where-exprtextSelection condition expression. This expression uses the alias parameters of the subactions "from" to identify the data source. Join operators: = No Outer Join += Right Outer Join =+ Left Outer Join +=+ Full Outer Join
distinctbooleanfalseif set to "true", rows with the same values will be filtered out
case-insensitivebooleanfalseif set to "true", the join will be performed in a case insensitive way (i.e. case of letters will not matter)

Result Attributes

NameTypeDescription
rowcntnumbernumber of rows generated
execution_timenumberthe length of time the action was executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka">testing join</z:log> <z:foreach xmlns:kafka="http://zagreus.com/kafka" key="i"> <z:in> <z:join where-expr="a.id = b.id"> <z:alias name="a">${[["id":1, "name":"Jozsi"], ["id":2, "name":"Pisti"]]}</z:alias> <z:alias name="b">${[["id":1, "address":"Pest"], ["id":2, "address":"Szeged"]]}</z:alias> </z:join> </z:in> <z:log>$i</z:log> </z:foreach>
<z:format xmlns:kafka="http://zagreus.com/kafka" type="text" row-separator="" column-separator="" header="true" output="join2.txt"> <z:join select="fatherAlias=a.Father,b.Mother=motherAlias,a.Son, b.Son" where-expr="a.Son+=b.Son" output="join1.txt"> <z:alias name="a">${[['Father':'Zeus', 'Son':'Zagreus'], ['Father':'Zeus', 'Son':'Ares']]}</z:alias> <z:alias name="b">${[['Son':'Zagreus', 'Mother':'Semele'],['Son':'Aeneas', 'Mother':'Aphrodite']]}</z:alias> </z:join> </z:format>
<excel:workbook xmlns:kafka="http://zagreus.com/kafka" output="xx.xls"> <excel:data sheet="x"> <z:filter key="xx" where-expr="xx.br_id='A'"> <z:join select="" where-expr="x.br_id=y.br_id" output="/users/demo/join.txt"> <z:alias name="y"> <z:parse row-separator=";" column-separator="," header="true">br_id,x;A,1;B,2;C,3</z:parse> </z:alias> <z:alias name="x" _v="0" _w="-1" _h="-1"> <z:parse row-separator=";" column-separator="," header="true">br_id,x;A,1;B,2;C,3</z:parse> </z:alias> </z:join> </z:filter> </excel:data> </excel:workbook>

z:list

Creates a list typed value from its content.

Examples

<z:list xmlns:kafka="http://zagreus.com/kafka" xmlns:json="http://zagreus.com/json" alias="actlist"> <z:text>123</z:text> <z:text>234</z:text> <z:text>345</z:text> <z:text>456</z:text> </z:list>
<json:create xmlns:json="http://zagreus.com/json" xmlns:kafka="http://zagreus.com/kafka"> <z:list> <z:text>${number(123)}</z:text> <z:text>${null}</z:text> <z:text>${true}</z:text> <z:text>${false}</z:text> <z:text>123</z:text> </z:list> </json:create>

z:log

Writes its content to the connected logging device. When there is a custom log connection specified by action "z:logfile", this action writes into the given file. Otherwise in standalone mode it displays the log info on the standard output, while in embedded mode it sends data to the server logger. The log message will be only displayed when its level is not after the specified loglevel in the ordered list of possible values.

Attributes

NameTypePossible ValuesDefault ValueDescription
leveltextuser
error
warning
info
debug
userthe log level of the message
null-formattextThe format of the "null" elements in the result of the action. "_empty" refers to an empty string, otherwise the given text will be used. Default value is "".

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<z:loglevel xmlns:kafka="http://zagreus.com/kafka" level="debug"/> <z:log xmlns:kafka="http://zagreus.com/kafka" level="user">This is a message</z:log>

z:logfile

Specifies a custom log target.

Attributes

NameTypePossible ValuesDefault ValueDescription
filenametextPath of the target. If not specified or its value is empty, the log target will be switched back to the system logger.
indentbooleantrueif set to "true", the log file will show structure information by using indenting

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka">log to the logger</z:log> <z:logfile xmlns:kafka="http://zagreus.com/kafka" filename="log.out"/> <z:log xmlns:kafka="http://zagreus.com/kafka">log to file first</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka">log to file second</z:log> <z:logfile xmlns:kafka="http://zagreus.com/kafka"/> <z:log xmlns:kafka="http://zagreus.com/kafka">log to the logger again</z:log>

z:loglevel

Specifies the log level for the current action context. A log message will be only displayed when its level is not after the specified loglevel in the ordered list of possible values.

Attributes

NameTypePossible ValuesDefault ValueDescription
leveltextuser
error
warning
info
debug
userthe log level

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<z:loglevel xmlns:kafka="http://zagreus.com/kafka" level="debug"/> <z:log xmlns:kafka="http://zagreus.com/kafka" level="user">This is a message</z:log>

z:not

Inverts the boolean value comes from its content.

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<file:connection xmlns:kafka="http://zagreus.com/kafka" name="xfile" filename="x.txt"/> <z:variable xmlns:kafka="http://zagreus.com/kafka" name="line"/> <z:while xmlns:kafka="http://zagreus.com/kafka"> <z:test> <z:not> <file:eof connection-name="xfile"/> </z:not> </z:test> <z:log> <file:readline connection-name="xfile"/> </z:log> </z:while>

z:on-error

Creates an error handler for the specified error. The content of the action is executed when a not handled error is happened somewhere in the descendent actions of the parent action. During the handler execution the local variable "error" can be used to access the context where the handled error happened. After handling the error it will not be propagated to the next handler upwards, unless "z:raise" action is invoked directly.

Attributes

NameTypePossible ValuesDefault ValueDescription
error-name*textthe name of the error to handle

Examples

<z:block xmlns:kafka="http://zagreus.com/kafka"> <z:on-error> <z:log>$db_sql</z:log> </z:on-error> <db:sql connection-name="db2">select * from xxx</db:sql> </z:block>
<z:log xmlns:kafka="http://zagreus.com/kafka">Testing error-handling</z:log> <z:block xmlns:kafka="http://zagreus.com/kafka"> <z:on-error error-name="IO"> <!-- variable error refers to the position where the error happened --> <z:log>file not found ${error.filename}</z:log> </z:on-error> <z:block> <z:parse> <z:log>finding file...</z:log> <file:read filename="nosuchfile"/> </z:parse> </z:block> </z:block>
<z:block xmlns:kafka="http://zagreus.com/kafka"> <z:on-error error-name="External"> <z:log>the exit code ${error.z_system.exit_value} is not zero</z:log> </z:on-error> <z:system>cmd /c dir</z:system> </z:block>
<z:foreach xmlns:kafka="http://zagreus.com/kafka" key="element" in="${['Southeast', 'Southwest']}"> <mstr:export connection-name="anchises" id="D94312924440C419A49E0681E1341625" output="${&quot;Minib_Controlling &quot; +element+ &quot; &quot;+ var_vormonat +&quot;.csv&quot;}"> <mstr:page-by title="Region" value="$element"/> </mstr:export> <z:on-error error-name="MSTR"/> </z:foreach>

z:on-event

Creates an event handler for the specified event. The content of this action will be executed when the specified event occurrs.

Attributes

NameTypePossible ValuesDefault ValueDescription
event-name *textbefore-child
before-all-children
after-child
after-all-children
before-all-childrenname of the event to handle

Examples

<z:block xmlns:kafka="http://zagreus.com/kafka"> <z:on-event event-name="after-child"> <z:log>After child</z:log> </z:on-event> <action_1></action_1> <action_2></action_2> <action_n></action_n> </z:block>

z:param

Defines a parameter for template definition (action z:template) and for template calling (action z:call-template). The parameter value is set to the evaluated content expression.

Attributes

NameTypePossible ValuesDefault ValueDescription
name *textname of the parameter

Examples

<z:template xmlns:kafka="http://zagreus.com/kafka" name="make-insert"> <z:param name="record"/> <z:param name="dbname"/> <z:variable name="keylist" _v="0" _w="-1" _h="-1" no-result="yes"> <z:foreach key="key" in="${keys(record)}" _v="0" _w="-1" _h="-1">,$key</z:foreach> </z:variable> <z:variable name="valuelist" _v="0" _w="-1" _h="-1" _x="-1" _y="-1" no-result="yes"> <z:foreach _v="0" _w="-1" _h="-1" key="value" in="$record"> <z:if test-expr="isnumber(value)" _v="0" _w="-1" _h="-1"> <z:then _v="0" _w="-1" _h="-1">,$value</z:then> <z:else _v="0" _w="-1" _h="-1">,'$value'</z:else> </z:if> </z:foreach> </z:variable> <z:text>insert into $dbname(${substring(keylist,1)}) values(${substring(valuelist,1)})</z:text> </z:template>
<z:foreach xmlns:kafka="http://zagreus.com/kafka" key="item" in="$data"> <z:log> <z:call-template name="make-insert"> <z:param name="record">$item</z:param> <z:param name="dbname">xxx</z:param> </z:call-template> </z:log> </z:foreach>

z:parse

Transforms the contained textual content to iterable expression.

Attributes

NameTypePossible ValuesDefault ValueDescription
row-separatortext\ncharacter that used for separating rows
column-separatortext\tcharacter that used for separating columns
column-namestextComma separated list of names, that will be used as column names. If specified, attribute "header" has no effect.
fixed-fieldstextDefines the beginning and ending of columns. If specified, column-separator char setting will not be used. The format of this attribute is a comma separated list of column definition sequences in the form "from-to". "from" and "to" measure character position in a row, the first character has position 1. If "from" or "to" are missing, their values will be 1 or the length of the row, respectively.
headerbooleanfalseif "true", the first row is treated as header info for columns
typetextIf set to "ini", the source will be handled as ini file, i.e. rows of name=value pairs. In this case the generated text uses the row-separator as line separator, attributes "column-separator" and "header" have no effect.
quotationtextDefines the character (e.g. double quote character) which is used to indicate the special case when there is a column-separator character is present inside the text.
quotation-starttextIf the quotation starting and ending characters are different, this attribute can be used to specify the starting one.
quotation-endtextIf the quotation starting and ending characters are different, this attribute can be used to specify the ending one.

Result Attributes

NameTypeDescription
rowcntnumbernumber of rows generated
columncntnumbernumber of columns generated
execution_timenumberthe length of time the action was executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka">Testing parse</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <z:parse column-separator="," row-separator=";" header="true">a,b,c;1,2,3;4,5;6,7,8,9,10</z:parse> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:parse fixed-fields="1-3,4-6,7-" column-names="a,b,c," header="false">12 23 34 ;23 34 45</z:parse> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka">Testing for-each with parse</z:log> <z:foreach xmlns:kafka="http://zagreus.com/kafka" key="x"> <z:in> <z:parse column-separator=","> <file:read filename="test.txt"/> </z:parse> </z:in> <z:log>loop: $x </z:log> </z:foreach>
<excel:workbook xmlns:kafka="http://zagreus.com/kafka" output="out.xls"> <excel:data sheet="sheet1"> <z:parse row-separator=";" column-separator="#" header="true" number-language-format="de" number-format="${['a': '#,##0;(#,##0)', 'b': '#,##0.00', 'c': '#0.00%']}" date-format="${['d': 'yyyy-MM-dd']}">a#b#c#d;1#2,2#3%#2007-01-02;4#5,6#7%#2007-01-02</z:parse> </excel:data> </excel:workbook>
<z:parse xmlns:kafka="http://zagreus.com/kafka" type="ini" row-separator="" column-separator="" header="true" alias="in"> <file:read filename="versand.ini" binary="false"/> </z:parse>
<z:log xmlns:kafka="http://zagreus.com/kafka">Testing quotation</z:log> <z:parse xmlns:kafka="http://zagreus.com/kafka" column-separator="," row-separator=";" header="true" quotation="&quot;" alias="asd">a,b,c;"1,2 and 3",2,3;4,5;6,7,8,9,10</z:parse> <z:log xmlns:kafka="http://zagreus.com/kafka">it should be '1,2 and 3': ${asd[1].a}</z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka">Testing quotation-start and quotation-end</z:log> <z:parse xmlns:kafka="http://zagreus.com/kafka" column-separator="," row-separator=";" header="true" quotation-start="`" quotation-end="'" alias="asd">a,b,c;`1,2 and 3',2,3;4,5;6,7,8,9,10</z:parse> <z:log xmlns:kafka="http://zagreus.com/kafka">it should be '1,2 and 3': ${asd[1].a}</z:log>

z:raise

Throws an error with the specified name. The generated error should be handled by an error handler (action z:on-error) for an ascendant action, otherwise the execution of the script will stop with error.

Attributes

NameTypePossible ValuesDefault ValueDescription
error-name*textthe name of the error to raise

Examples

<z:block xmlns:kafka="http://zagreus.com/kafka"> <z:on-error error-name="custom_error"> <z:log>error is throw</z:log> </z:on-error> <z:foreach> <mail:send> <mail:attachment> <z:if test="..."> <z:then> <z:raise error-name="custom_error"/> </z:then> </z:if> </mail:attachment> </mail:send> </z:foreach> </z:block>
<file:exist xmlns:kafka="http://zagreus.com/kafka" alias="x" filename="/admin/<-filesystem->/testfile.txt"/> <z:if xmlns:kafka="http://zagreus.com/kafka" test-expr="x"> <z:then> <z:log>File exists.</z:log> </z:then> <z:else> <z:raise error-name="error"/> </z:else> </z:if>

z:return

Return from the parent action. The parent action will get the result of z:return action as content.

Result Attributes

NameTypeDescription
stackTracetextthe stacktrace of the last error
errorMessagenumberthe last error message

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:block> content before <z:return>This is the return value</z:return> content after </z:block> </z:log>

z:reverse

Reverses the result of the child actions: if the input is a list or a table, it reverses the order of elements; if the input is text, it reverses the lines.

Result Attributes

NameTypeDescription
rowcntnumbernumber of rows generated
execution_timenumberthe length of time the action was executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:reverse> <z:text>a b c</z:text> <z:text>a b d</z:text> </z:reverse> </z:log> <z:log xmlns:kafka="http://zagreus.com/kafka">$z_reverse</z:log>

z:sort

Sorts the content of the action.

Attributes

NameTypePossible ValuesDefault ValueDescription
keytextthisthe variable that represents the row
order-by*textOrdering expression. Ordering expression contain field expressions, separated by commas. Field expressions are expressions that can refer to row dependent data (e.g. the fields of the variable that specified in the "key" attribute). Field expressions can include the ordering direction: "asc" or "desc".
distinctbooleanfalseif set to "true", rows with the same values will be filtered out

Result Attributes

NameTypeDescription
rowcntnumbernumber of rows generated
execution_timenumberthe length of time the action was executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:sort key="row" order-by="row.b asc, row.a desc" distinct="true"> <z:parse row-separator=";" column-separator="," header="true" alias="f1">a,b,c;4,2,3;4,2,3;1,2,6 </z:parse> </z:sort> </z:log>

z:switch

Executes one of its enclosed subaction "z:case" or "z:else" depending on the test condition.

Attributes

NameTypePossible ValuesDefault ValueDescription
test-expr*textselection condition expression

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<z:variable xmlns:kafka="http://zagreus.com/kafka" name="x">b</z:variable> <z:log xmlns:kafka="http://zagreus.com/kafka">Testing switch statement</z:log> <z:switch xmlns:kafka="http://zagreus.com/kafka" test-expr="x"> <z:case value="a"> <z:log>case a</z:log> </z:case> <z:case value="b"> <z:log>case b</z:log> </z:case> <z:case value="c"> <z:log>case c</z:log> </z:case> <z:else> <z:log>else</z:log> </z:else> </z:switch>

z:synchron

Waits finishing all async executions that started within the action. Async executions are action executions that supply async event listener. At this moment the only available action of this kind is the "zs:runscript".

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<z:synchron xmlns:kafka="http://zagreus.com/kafka"> <zs:runscript connection-name="win2003" script-name="/admin/0_SYSTEM_TEST/Z/util/sleep" async="true"> <zs:variable name="sleep_time" value="3000"/> </zs:runscript> <zs:runscript connection-name="win2003" script-name="/admin/0_SYSTEM_TEST/Z/util/sleep" async="true"> <zs:variable name="sleep_time" value="6000"/> </zs:runscript> </z:synchron>

z:system

Executes the contained external command, and returns the generated standard output as result.

Attributes

NameTypePossible ValuesDefault ValueDescription
asyncbooleanfalseif set to "true", script execution does not wait for the end of the execution, it returns immediately
shelltextsh
cmd
Specifies the command processor that will be used for executing. "sh" for Linux and Unix systems, "cmd" for Windows system.
shell-paramtext-c
/c
Specifies the first parameter for the command processor. This attribute should inform the command processor that the next argument is a text that contains the executing expression. "-c" for "sh" shell, "/c" for "cmd" command processor.
encodingtextthe encoding name to use for output encoding
parse-quotesbooleanfalsewhether we should treat parts inside quotes as one token or no

Result Attributes

NameTypeDescription
exit_valuenumberreturn value of the system
rowcntnumbernumber of rows generated
execution_timenumberthe length of time the action was executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:on-error error-name="External"> <z:log>the exit code ${error.z_system.exit_value} is not zero</z:log> </z:on-error> <z:system>dir</z:system> </z:log>
<file:write xmlns:kafka="http://zagreus.com/kafka" filename="out.text"> <z:system>dir</z:system> </file:write>
<z:system xmlns:kafka="http://zagreus.com/kafka" alias="res">del testdir\*.* /q</z:system> <z:foreach xmlns:kafka="http://zagreus.com/kafka" key="file" in="$res"> <z:log>$file</z:log> </z:foreach>

z:tail

Filters the result of the child actions to keep only the last N lines. If the input is a list, then it keeps the last N elements. If the skip attribute is set, then the first given number of lines are first ignored.

Attributes

NameTypePossible ValuesDefault ValueDescription
linesnumber10the number of lines to keep
skipnumber0the number of lines which will be skipped from the end of the input. Takes precedence over "lines", i.e. lines="10" skip="5" will keep the 6th...15th lines from the end. If only "skip" is specified, all other lines will be kept

Result Attributes

NameTypeDescription
rowcntnumbernumber of rows generated
execution_timenumberthe length of time the action was executed

Examples

<z:tail xmlns:kafka="http://zagreus.com/kafka" lines="4" log="true"> <z:text>a b c</z:text> <z:text>a b d</z:text> </z:tail> <z:log xmlns:kafka="http://zagreus.com/kafka">$z_tail</z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> Log out: a, b, c <z:tail lines="4" skip="3"> <z:text>a b c</z:text> <z:text>d e f</z:text> </z:tail> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> Log out: b, c, d, e <z:tail lines="4" skip="1"> <z:text>a b c</z:text> <z:text>d e f</z:text> </z:tail> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> Log out: a <z:tail lines="10" skip="5"> <z:text>a b c</z:text> <z:text>d e f</z:text> </z:tail> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> Log out: 1, 2, ... 14 (i.e. ALL lines except the last one) <z:tail skip="1"> <z:text>1 2 3 4 5 6 7 8 9 10 11 12 13 14 15</z:text> </z:tail> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:tail lines="25"> <file:read filename="first_file.txt" binary="false"/> <file:read filename="second_file.txt" binary="false"/> </z:tail> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:tail lines="20" skip="5"> <file:dir path="/users/zagreus_test/folder1" details="true"/> </z:tail> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> Log out: 1 2 3 and g h i (z:parse gives a Zagreus table with keys 1, 2 and 3; and we keep the first entry of it, which is g h i) <z:head lines="1"> <z:parse row-separator="\n" column-separator=";" header="false">a;b;c d;e;f g;h;i</z:parse> </z:head> </z:log>

z:template

Defines a template with the specified name. The content of the template will be executed when the template is called by z:call-template. The values of the contained z:param subactions defines the formal parameters with their default values, these parameters can be modified by the actual parameters of the z:call-template.

Attributes

NameTypePossible ValuesDefault ValueDescription
name*textname of the template to define

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka">Testing templates</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka">Defining a template with name "X2"</z:log> <z:template xmlns:kafka="http://zagreus.com/kafka" name="X${1 + 1}"> <z:param name="x">default x</z:param> <z:param name="y">default y</z:param> <z:log>template called with x=$x and y=$y</z:log> </z:template>
<z:template xmlns:kafka="http://zagreus.com/kafka" name="make-insert"> <z:param name="record"/> <z:param name="dbname"/> <z:variable name="keylist" _v="0" _w="-1" _h="-1" no-result="yes"> <z:foreach key="key" in="${keys(record)}" _v="0" _w="-1" _h="-1">,$key</z:foreach> </z:variable> <z:variable name="valuelist" _v="0" _w="-1" _h="-1" _x="-1" _y="-1" no-result="yes"> <z:foreach _v="0" _w="-1" _h="-1" key="value" in="$record"> <z:if test-expr="isnumber(value)" _v="0" _w="-1" _h="-1"> <z:then _v="0" _w="-1" _h="-1">,$value</z:then> <z:else _v="0" _w="-1" _h="-1">,'$value'</z:else> </z:if> </z:foreach> </z:variable> <z:text>insert into $dbname(${substring(keylist,1)}) values(${substring(valuelist,1)})</z:text> </z:template> <z:foreach xmlns:kafka="http://zagreus.com/kafka" key="item" in="$data"> <z:log> <z:call-template name="make-insert"> <z:param name="record">$item</z:param> <z:param name="dbname">xxx</z:param> </z:call-template> </z:log> </z:foreach>

z:text

Creates a text typed value from its content.

Examples

<db:call xmlns:kafka="http://zagreus.com/kafka" connection-name="conn" _x="45" _y="268" _w="-1" _h="-1" _v="0"> <z:text>sysproc.admin_cmd('runstats on table db2admin.test')</z:text> </db:call>
<file:write xmlns:kafka="http://zagreus.com/kafka" filename="out.txt" append="false"> <z:foreach key="item" in="$tabelle"> <z:text>$item</z:text> </z:foreach> </file:write>
<z:template xmlns:kafka="http://zagreus.com/kafka" name="make-insert"> <z:param name="record"/> <z:param name="dbname"/> <z:variable name="keylist" _v="0" _w="-1" _h="-1" no-result="yes"> <z:foreach key="key" in="${keys(record)}" _v="0" _w="-1" _h="-1">,$key</z:foreach> </z:variable> <z:variable name="valuelist" _v="0" _w="-1" _h="-1" _x="-1" _y="-1" no-result="yes"> <z:foreach _v="0" _w="-1" _h="-1" key="value" in="$record"> <z:if test-expr="isnumber(value)" _v="0" _w="-1" _h="-1"> <z:then _v="0" _w="-1" _h="-1">,$value</z:then> <z:else _v="0" _w="-1" _h="-1">,'$value'</z:else> </z:if> </z:foreach> </z:variable> <z:text>insert into $dbname(${substring(keylist,1)}) values(${substring(valuelist,1)})</z:text> </z:template> <z:foreach xmlns:kafka="http://zagreus.com/kafka" key="item" in="$data"> <z:log> <z:call-template name="make-insert"> <z:param name="record">$item</z:param> <z:param name="dbname">xxx</z:param> </z:call-template> </z:log> </z:foreach>

z:then

Defines a then block inside a z:if statement

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka">Testing if statement</z:log> <z:variable xmlns:kafka="http://zagreus.com/kafka" name="x">2</z:variable> <z:if xmlns:kafka="http://zagreus.com/kafka" test-expr="x < 2"> <z:then> <z:log>Then Part</z:log> </z:then> <z:else> <z:log>Else Part</z:log> </z:else> </z:if>

z:union

Generates the unions of the result of subcontents.

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <z:union> <z:parse row-separator=";" column-separator="," header="true" alias="f1">a,b,c;1,2,3;4,5,6;7,8,9 </z:parse> <z:parse row-separator=";" column-separator="," header="true" alias="f1">a,b,c;3,2,1;6,5,4;9,8,7 </z:parse> </z:union> </z:log>

z:variable

Defines a variable with a given name. The variable value will be set to the evaluated value of the content. Variable is the synonym of "alias".

Attributes

NameTypePossible ValuesDefault ValueDescription
name*textthe name of the variable
monitorbooleanfalseif "true", the variable can be monitored in real-time by the Zagreus Monitor
scopetextlocal
global
localthe scope of the variable

Examples

<z:variable xmlns:kafka="http://zagreus.com/kafka" name="x">outer</z:variable> <z:block xmlns:kafka="http://zagreus.com/kafka"> <z:variable name="x">inner</z:variable> <z:log>inner variable: $x</z:log> </z:block> <z:log xmlns:kafka="http://zagreus.com/kafka">outer variable: $x</z:log>
<z:variable xmlns:kafka="http://zagreus.com/kafka" name="y"> <z:parse row-separator=";" column-separator="," header="true">br_id,x;A,1;B,2;C,3;D,4;E,5</z:parse> </z:variable>
<z:variable xmlns:kafka="http://zagreus.com/kafka" name="exceldata"> <excel:read filename="user.xls" sheet="user" header="true"/> </z:variable>
<z:block xmlns:kafka="http://zagreus.com/kafka"> <z:variable name="x" scope="global">X</z:variable> </z:block> <z:log xmlns:kafka="http://zagreus.com/kafka">We output X: $x</z:log>

z:while

Executes the enclosing content while the test condition is evaluated as true. Execution can be stopped by calling action "z:break".

Attributes

NameTypePossible ValuesDefault ValueDescription
test-expr*textloop condition expression
loop-countertextspecifies the name of the implicit variable which is used for counting the loops. If set, this variable is changing its value in every loop cycle.
monitor-counterbooleanfalseif set to true, the loop counter variable will be set as a monitoring variable

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed
loopcntnumberthe total count the loop was executed

Examples

<file:connection xmlns:kafka="http://zagreus.com/kafka" name="filex" filename="eini.txt" mode="read"/> <file:connection xmlns:kafka="http://zagreus.com/kafka" name="filey" filename="eini.out" mode="append"/> <z:while xmlns:kafka="http://zagreus.com/kafka"> <z:test> <z:not> <file:eof connection-name="filex"/> </z:not> </z:test> <file:readline connection-name="filex" alias="line"/> <z:log>$line</z:log> <file:write connection-name="filey">$line</file:write> </z:while>

zip:dir

Reads the entry names from a zipped file.

Attributes

NameTypePossible ValuesDefault ValueDescription
filenametextname the zipped file
pathtextthe item prefix in the zipped file
detailsbooleanfalsewhether to include file details

Result Attributes

NameTypeDescription
rowcntnumbernumber of rows generated
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription
filenametextthe name of the resource in the zip file
sizenumberthe size of the resource in the zip file
dirtextwhether the resource is a directory or not in the zip file
lastmodtimedatelast modification time of the resource in the zip file
compressedsizenumberthe compressed size of the resource in the zip file

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <zip:dir filename="sample.zip" path="path/to/the/file"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <zip:dir filename="sample.zip" details="true" date-format="YYYY-MM-dd hh:mm:ss"/> </z:log>

zip:file

Creates a zip resource. The contained item resources will be packed into the created resource.

Attributes

NameTypePossible ValuesDefault ValueDescription
passwordtextthe password for the file
cpasswordtextthe encrypted password for the file
wildcardtextIt is a path to the target file(s). When specified, the filtered items by the wildcard are also added to the ZIP file. Asterisk (*) and question mark (?) characters can also be used. Note: other child action (e.g. file:read) is not needed.

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<zip:file xmlns:kafka="http://zagreus.com/kafka" output="test.zip" password="topsecret79"> <zip:item filename="out.txt"> <file:read binary="true" filename="res.txt"/> </zip:item> <zip:item filename="out2.txt"> <file:read binary="true" filename="res2.txt"/> </zip:item> </zip:file>
<zip:file xmlns:kafka="http://zagreus.com/kafka" output="test.zip" wildcard="/users/zagreus_test/<-filesystem->/subfolder/*.txt"/>
<z:log xmlns:kafka="http://zagreus.com/kafka">zips the content of the whole subfolder recursively</z:log> <zip:file xmlns:kafka="http://zagreus.com/kafka" output="test.zip" wildcard="/users/zagreus_test/<-filesystem->/subfolder"/>
<z:log xmlns:kafka="http://zagreus.com/kafka">zips the content of the whole subfolder recursively along with the specified file</z:log> <zip:file xmlns:kafka="http://zagreus.com/kafka" output="test.zip" wildcard="/users/zagreus_test/local_database_subfolder"> <zip:item filename="additional_file.txt"> <file:read binary="true" filename="additional_file.txt"/> </zip:item> </zip:file>

zip:item

Specifies an item to packed into a zip file. Its content will be packed and stored in a zip resource file using the specified name.

Attributes

NameTypePossible ValuesDefault ValueDescription
filenametextthe name of the item in the packed file

Result Table

NameTypePossible ValuesDescription

Examples

<zip:file xmlns:kafka="http://zagreus.com/kafka" output="test.zip" password="topsecret79"> <zip:item filename="out.txt"> <file:read binary="true" filename="res.txt"/> </zip:item> </zip:file>

zip:read

Reads an entry from a zipped file.

Attributes

NameTypePossible ValuesDefault ValueDescription
filenametextname the zipped file
pathtextthe item name in the zipped file
passwordtextthe password for the item (if any)
cpasswordtextthe encrypted password for the item
binarybooleantrueif true, the readed item will handled as binary file

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <zip:read filename="sample.zip" path="path/to/the/item.txt" password="topsecret79" binary="false" output="item.txt"/> </z:log>

zs:backup

Creates a backup dump of the Zagreus SQL metadata.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
folder*textThe root target folder for the backup. It is an operational system native path (e.g. "C:\BackupFolder").
zipbooleanfalseif set to "true", the result will be packed into a zip file

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<zs:backup xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" folder="${serverWorkingFolder}/backup"/>

zs:cancel

Cancels a job on a remote Zagreus server.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<zs:cancel xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" job-id="2a1531ef-7f46-4e6e-9dbc-22c4935b835c"/>
<zs:cancel xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" status="queued;starting"/>

zs:connection

Defines a connection to another Zagreus server.

Attributes

NameTypePossible ValuesDefault ValueDescription
name*textName of the connection. This name has to be used in the other Zagreus Server actions; if left blank, the action will refer to the Zagreus server where the actual script is stored.
server*textthe name or IP address of the server
portnumber7323port address of the server
user*textuser name for authentication
passwordtextpassword for user authentication
cpasswordtextencrypted password for user authentication
securebooleanfalsewhether the connection should be secure or non-secure

Result Attributes

NameTypeDescription
servertextthe name or IP address of the server
portnumberport address of the server
usertextuser name for authentication
securebooleanwhether the connection should be secure or non-secure
execution_timenumberthe length of time the action was executed

Examples

<zs:connection xmlns:kafka="http://zagreus.com/kafka" name="demo8" server="62.99.218.122" user="administrator" password="SecretPassword7323"/> <zs:list xmlns:kafka="http://zagreus.com/kafka" connection-name="demo8" parent-name="/administrator/folder" output="filelist.txt"/>

zs:copy

Copies a resource to another folder (but within the same Zagreus server).

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
target-nametextthe new name of the copied resource
copy-parametersbooleanfalseshould the script parameters (variables and options) be also copied or not
overwritetexttrueIf a resource with the name used already exists in the target folder, we can set with this attribute what will happen. Value "true" indicates that this file will be overwritten; value "false" indicates that no file will be created. If some other string is specified (like "Copy of "), it will be added to the beginning of the resource title; if there is also a resource with this name, the first free number will be added to the end (like "Copy of Test Script (16)").
all-versionsbooleantrueshould we copy all versions of the resource or not

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<zs:copy xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" source-name="/admin/BO/BO reportname" folder-name="/admin/TEST/"/>
<zs:copy xmlns:kafka="http://zagreus.com/kafka" connection-name="zagreus" source-id="402881db1058c85f01105960a7c10015" folder-name="/admin/TEST_20070613"/>

zs:createevent

Creates an event schedule.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
event-name*textthe name of the new event schedule
event-idtextthe id of the new event
descriptiontextthe description of the new event schedule
overwritetexttrueIf a resource with the name used already exists in the target folder, we can set with this attribute what will happen. Value "true" indicates that this file will be overwritten; value "false" indicates that no file will be created. If some other string is specified (like "Copy of "), it will be added to the beginning of the resource title; if there is also a resource with this name, the first free number will be added to the end (like "Copy of Test Script (16)").

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<zs:createevent xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" event-name="new event" folder-name="/admin/eventfolder/" description="sample event schedule"/>

zs:createresource

Creates a resource on the Zagreus server.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
resource-name*textthe name of the new resource
resource-idtextthe id of the new resource. The version of the script can be specified by the version number written at the end of the ID (e.g.: |&1.0.0.2).
typetextbinary
connection
event
folder
script
template
timeschedule
scriptthe type of the new resource
descriptiontextthe description of the new resource
currentbooleantrueif set, this version should be the current version
overwritetexttrueIf a resource with the name used already exists in the target folder, we can set with this attribute what will happen. Value "true" indicates that this file will be overwritten; value "false" indicates that no file will be created. If some other string is specified (like "Copy of "), it will be added to the beginning of the resource title; if there is also a resource with this name, the first free number will be added to the end (like "Copy of Test Script (16)").

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<zs:createresource xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" resource-name="newfolder" folder-name="/admin/testfolder/" type="folder"/> <zs:createresource xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" resource-name="newscript" folder-name="/admin/testfolder/" description="sample zagreus script" alias="res"> <file:read filename="localfile.xml"/> </zs:createresource> <zs:createresource xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" resource-name="newscript" resource-id="${left(res,32)}|&amp;1.0.0.2" folder-name="/admin/testfolder/" type="script" current="true" overwrite="true"/>

zs:createschedule

Creates a time schedule. All timing parameters which are not set are set to the first available option if they are smaller than the first set parameter, and to "every" if they are greater. Thus, if only hour="10" is set, the time schedule will fire every day at 10:00:00. If hour="10" and month="1-4" is set, the time schedule will fire every day at 10:00:00 in January, February, March and April (and, of course, every year).

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
schedule-name*textthe name of the new time schedule
schedule-idtextthe id of the new time schedule
descriptiontextthe description of the new time schedule
overwritetexttrueIf a resource with the name used already exists in the target folder, we can set with this attribute what will happen. Value "true" indicates that this file will be overwritten; value "false" indicates that no file will be created. If some other string is specified (like "Copy of "), it will be added to the beginning of the resource title; if there is also a resource with this name, the first free number will be added to the end (like "Copy of Test Script (16)").
yearnumberthe year parameter
day-of-weeknumberthe day-of-week parameter
monthnumberthe month parameter
daynumberthe day parameter; if set, overrides the day-of-week parameter
hournumberthe hour parameter
minutenumberthe minute parameter
secondnumberthe second parameter

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<zs:createschedule xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" event-name="new time schedule" folder-name="/admin/eventfolder" description="sample time schedule" month="1,10" day-of-week="MON,THU"/>
<zs:createschedule xmlns:kafka="http://zagreus.com/kafka" connection-name="zagreus" folder-name="/admin/TEST" schedule-name="very important time schedule" second="10" hour="5" month="3" day="10"/>

zs:createscript

Creates a script on the Zagreus server. There is the possibility to set the script parameters and options.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-namenumbername of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
script-name*numberthe name of the new script
script-idnumberThe id of the new script. The version of the script can be specified by the version number written to the end of the ID (e.g.: |&1.0.0.2).
descriptionnumberthe description of the new script
overwritetexttrueIf a resource with the name used already exists in the target folder, we can set with this attribute what will happen. Value "true" indicates that this file will be overwritten; value "false" indicates that no file will be created. If some other string is specified (like "Copy of "), it will be added to the beginning of the resource title; if there is also a resource with this name, the first free number will be added to the end (like "Copy of Test Script (16)").

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<zs:createscript xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" script-name="new zagreus script" folder-name="/admin/testfolder/" description="sample zagreus script" alias="res"> <file:read filename="localfile.xml"/> <zs:variable name="param1">value1</zs:variable> </zs:createscript> <zs:createscript xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" script-name="new zagreus script" script-id="${left(res,32)}|&amp;1.0.0.2" folder-name="/admin/testfolder/" overwrite="true"> <file:read filename="localfile.xml"/> </zs:createscript>

zs:delete

Deletes a resource.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<zs:delete xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" resource-name="/admin/BO/BO reportname copy"/>
<zs:delete xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" resource-name="/admin/script-to-be-deleted-forever" permanent="true"/>

zs:emptyrecyclebin

Makes the server side recycle bin empty.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<zs:emptyrecyclebin xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection"/>

zs:filter-group

Groups filter expressions for the zs:joblist action. It can contain filter definitions and other filter-groups also, making possible to compose complex filtering expressions.

Attributes

NameTypePossible ValuesDefault ValueDescription
operator*textAND
OR
NOT
the relation of the check

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<zs:joblist xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" status="finished;cancelled"> <zs:filter-group operator="OR"> <zs:filter variable="job.beginQueueTime" operator=">" value="${date('2009-02-10 11:10:00', 'yyyy-MM-dd hh:mm:ss')}"/> <zs:filter variable="job.script.name" operator="=" value="testscript"/> </zs:filter-group> </zs:joblist>

zs:filter

Defines a filter expression for the zs:joblist action. Usually, it is contained by zs:filter-group, but can be used without explicit grouping also, in this case, the filter expressions will be stored in an implicitly created AND group.

Attributes

NameTypePossible ValuesDefault ValueDescription
variable*textName of the variable (job property) to check. The "job.status" property can be filtered both by integer and string values.
operator*text<
<=
=
<>
=>
>
between
in
like
the relation of the check
value*texta constant value; for between and in, multiple values can be defined, separated by ";"s

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<zs:joblist xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" status="finished;cancelled"> <zs:filter-group operator="OR"> <zs:filter variable="job.beginQueueTime" operator=">" value="${date('2009-02-10 11:10:00', 'yyyy-MM-dd hh:mm:ss')}"/> <zs:filter variable="job.script.name" operator="=" value="testscript"/> </zs:filter-group> </zs:joblist>
<zs:joblist xmlns:kafka="http://zagreus.com/kafka" connection-name="zagreus" status="" alias="a"> <zs:filter variable="job.status" operator="between" value="2;finished"/> </zs:joblist>

zs:fireevent

Fires an event on a remote Zagreus server.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<zs:fireevent xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" event-name="/admin/testfolder/sample event"/>

zs:getlaststatus

Gives the status of the lastly executed job of a given script.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running

Result Attributes

NameTypeDescription
jobIdtextthe ID of the last job
statusnumberthe status of the last job
statusnametextthe status of the last job
scriptidtextthe ID of the script
scriptnametextthe name of the script
scriptpathtextthe path of the script
beginexectimedatethe begin execution time of the last job
endexectimedatethe end execution time of the last job
beginqueuetimedatethe begin queue time of the last job
endqueuetimedatethe end queue time of the last job
callertextthe caller of the last job
callertypenumberthe caller type of the last job
callertypenametextthe caller type of the last job
execprioritynumberthe priority of the last job
execmodenumber
numoflogsnumber
workeridnumber
useridnumber
parentjobidtext
resulttimeoutnumber
workercontrolleridnumber
resulttypenumber
result
messagetext
variablestext
optionstext
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <zs:getlaststatus connection-name="zsconnection" script-id="402881db17f901aa0117f90d99200005"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <zs:getlaststatus connection-name="zsconnection" script-name="/users/zagreus/sample script"/> </z:log>

zs:getlog

Gets the log file of the job specified by its id.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
job-idtextthe job identifier

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<zs:runscript xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" script-name="/admin/BO/BO documentname" alias="jobId"/> <zs:wait xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" job-id="$jobId"/> <z:log xmlns:kafka="http://zagreus.com/kafka"> <zs:getlog connection-name="zsconnection" job-id="$jobId"/> </z:log>

zs:getresource

Downloads a resource from the Zagreus server.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
outputtextthe name of the local file to download to

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<mail:send xmlns:kafka="http://zagreus.com/kafka" connection-name="gmail" from="zagreus@etixpert.com" to="testuser@etixpert.com" subject="sample pdf file"> <mail:attachment filename="sample01.pdf" content-type="application/pdf"> <zs:getresource connection-name="zsconnection" resource-name="/admin/testfolder/This is a PDF file.pdf"/> </mail:attachment> <mail:body>Test</mail:body> </mail:send>
<zs:getresource xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" resource-id="402881db1274034d011274e32e7e0002" output="samplescript.xml"/>

zs:getskippedjobs

Gives a list of the skipped jobs. Skipped jobs are ones which were scheduled via a time schedule, but were not even queued (e.g. because the Zagreus server was down). The list can be filtered to a time interval.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
subscription-idnumberthe id of the subscription
from*dateThe skipped jobs will be listed starting from this time. The format of this attribute can be a simple string: yyyy-MM-dd hh:mm:ss, or it can be defined as a date type (see example below).
todatethe actual timethe skipped jobs will be listed up to this time

Result Attributes

NameTypeDescription
rowcntnumberthe number of jobs found
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription
subscriptionidnumber
scriptid
scriptname
scriptpath
scheduleid
schedulename
schedulepath
timedate

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <zs:getskippedjobs connection-name="zsconnection" from="2018-07-07 00:00:00" to="2018-07-07 19:00:30"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <zs:getskippedjobs subscription-id="18" from="${date('2018-07-07')}"/> </z:log>

zs:getvariable

Gets the variables and options of a resource, job, user or group. The variables and options are available as result-attributes. If no variables nor options are specified, all variables and options will be returned; otherwise only the ones which were listed inside this action with the zs:variable and zs:option actions.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<zs:getvariable xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" script-name="/admin/BO/BO reportname"/>
<zs:getvariable xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" script-id="402881db1274034d011274e32e7e0002"> <zs:variable name="a"/> <zs:option name="job.max_queuing_time"/> </zs:getvariable>

zs:jobinfo

Gives information about a specified job.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
job-id*textthe id of the job to query

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription
jobId
statusnumber
statusname
scriptid
scriptname
scriptpath
beginexectimedate
endexectimedate
beginqueuetimedate
endqueuetimedate
execmode
execprioritynumber
numoflogsnumber
workeridnumber
useridnumber
caller
callertypenumber
callertypenametext
parentjobid
resulttimeout
workercontrolleridnumber
resulttype
result
messagetext
variables
options

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <zs:jobinfo connection-name="zsconnection" job-id="402881db17f901aa0117f90d99200005"/> </z:log>

zs:joblist

Gives a list of all the jobs. By default jobs which are currently running, shutting down, or are queued are listed, but this can be changed, either by using numeric or text values. Moreover, the jobs can be filtered on every possible property.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
statustextfinished
queued
cancelled
error
debugging
running
runningtimeout
queuetimeout
starting
suspended
running;queuedlist of the states of jobs to be listed, separated by semicolons (";")
ordertextOne can also set the order in which the jobs are returned. All returned fields can be set; when multiple attributes are chosen, they must be separated by ";"s. By default, jobs are sorted in ascending order; descending can be specified by adding "desc" after an attribute, separated by ":". E.g. "status;endexecutiontime:desc" sorts the jobs returned by status; jobs with the same status are sorted by end execution time, in descending order.
max-rowsnumber100the maximum number of jobs returned

Result Attributes

NameTypeDescription
rowcntthe number of jobs found
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription
jobId
statusnumber
statusname
scriptid
scriptname
scriptpath
beginexecutiontimedate
endexecutiontimedate
beginqueuetimedate
endqueuetimedate
caller
callertypenumber
callertypename

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <zs:joblist connection-name="zsconnection" status="finished;cancelled"> <zs:filter-group operator="OR"> <zs:filter variable="job.beginQueueTime" operator=">" value="${date('2009-02-10 11:10:00', 'yyyy-MM-dd hh:mm:ss')}"/> <zs:filter variable="job.script.name" operator="=" value="testscript"/> </zs:filter-group> </zs:joblist> </z:log>

zs:list

Lists the child resources of a given resource.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
current-version-onlybooleanfalseif set to "true", only the current versions will be listed
recursivebooleanfalseif "true", the content of all subfolders will also be listed

Result Attributes

NameTypeDescription
rowcntnumberthe number of resources found
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription
name
id
fullpath
ownderidnumber
parentid
creationtimedate
createdbynumber
modificationtimedate
type
description
contenttype
currentboolean
deletedboolean

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <zs:list connection-name="zsconnection" parent-name="/admin/TEST/"/> </z:log>

zs:migrate-subscription

zs:migrate-subscription is designed for migrating subscriptions between two Zagreus servers. It copies all data of the subscriptions, including variables, options, aliases, and their active status. The subscriptions to be migrated can be specified by scripts, schedules, or both. Further filtering can be applied by specifying the alias(es) of the subscriptions as well. Note that the IDs of both the schedules and the scripts have to be the same on the two Zagreus servers for all subscriptions involved. Also note that the IDs of the subscriptions will not match.

Attributes

NameTypePossible ValuesDefault ValueDescription
source-connection-nametextname of the source Zagreus connection
target-connection-nametextname of the target Zagreus connection
alias-filtertextthe alias of the subscriptions to be migrated to the target server. Can be separated by ";"s or ","s.
delete-existingbooleanfalseIf "true", the subscriptions matching the specified criteria will first be deleted on the target server. See the examples below.
set-inactivebooleanfalseIf "true", the migrated subscriptions will be set to inactive on the target server.

Result Attributes

NameTypeDescription
migrated_subscriptionslistA list of records (table) of the migrated subscriptions.
skipped_subscriptionslistA list of records (table) of the subscriptions which were skipped because the script/schedule with the given ID did not exist on the target server, or was of different type.
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka">Migrating all subscriptions of a script.</z:log> <zs:migrate-subscription xmlns:kafka="http://zagreus.com/kafka" source-connection-name="localhost" target-connection-name="remote" script-name="/admin/dev/script1"/>
<z:log xmlns:kafka="http://zagreus.com/kafka">Migrating all subscriptions of a schedule, but setting them inactive.</z:log> <zs:migrate-subscription xmlns:kafka="http://zagreus.com/kafka" source-connection-name="localhost" target-connection-name="remote" schedule-name="/admin/dev/schedule1" set-inactive="true"/>
<z:log xmlns:kafka="http://zagreus.com/kafka">Migrating the subscriptions with aliases of "cat" and "dog" only of a schedule.</z:log> <zs:migrate-subscription xmlns:kafka="http://zagreus.com/kafka" source-connection-name="localhost" target-connection-name="remote" schedule-name="/admin/dev/schedule1" alias-filter="dog,cat"/>
<z:log xmlns:kafka="http://zagreus.com/kafka">Migrating all subscriptions of a schedule, but first deleting all existing subscriptions of the given schedule on the target server.</z:log> <zs:migrate-subscription xmlns:kafka="http://zagreus.com/kafka" source-connection-name="localhost" target-connection-name="remote" schedule-name="/admin/dev/schedule1" delete-existing="true"/>
<z:log xmlns:kafka="http://zagreus.com/kafka">Migrating all subscriptions of a script belonging to a specific schedule, but first deleting all existing subscriptions of the given script-schedule pair on the target server. Note that subscriptions associated with the given script and with a different schedule, or the other way around (specified schedule, but another script) will not be copied from the source server, and will not be deleted from the target server.</z:log> <zs:migrate-subscription xmlns:kafka="http://zagreus.com/kafka" source-connection-name="localhost" target-connection-name="remote" script-name="/admin/dev/script1" schedule-name="/admin/dev/schedule42" delete-existing="true"/>
<z:log xmlns:kafka="http://zagreus.com/kafka">Migrating the subscriptions with aliases of "cat" and "dog" only of a schedule, but first deleting the subscriptions associated with this schedule with these aliases from the target server. (e.g. a subscription with an alias of "mouse", or with no alias at all, will be unaffected.)</z:log> <zs:migrate-subscription xmlns:kafka="http://zagreus.com/kafka" source-connection-name="localhost" target-connection-name="remote" schedule-name="/admin/dev/schedule1" alias-filter="dog,cat" delete-existing="true"/>

zs:migrate-user-group

zs:migrate-user-group is a complex action for migrating users or groups between two Zagreus servers. It can create groups for user migration as well if needed.

Attributes

NameTypePossible ValuesDefault ValueDescription
source-connection-nametextname of the source Zagreus connection
target-connection-nametextname of the target Zagreus connection
auto-group-creationbooleanfalseIf "true", the groups mapped to user rights will be created on the target side. If false, and the particular groups do not exist on target side, an error is thrown.

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<zs:migrate-user-group xmlns:kafka="http://zagreus.com/kafka" source-connection-name="localhost" target-connection-name="remote" account-name="testuser" auto-group-creation="true"/>

zs:migrate

zs:migrate is a complex action for migrating resources between two Zagreus servers. It can migrate simple resources or folder structures as well. If the resource does not exist in the target folder with the given name, it will be created and the source resource ID will be used. If the resource exists in the target folder with the same name, there are two options based on the resource ID of the resource: - if resource IDs are the same, the target resource will be overwritten - if resource IDs are different, an error message will be thrown. When a folder is copied, the structure is processed in recursive way. The settings are applied to single resources one by one.

Attributes

NameTypePossible ValuesDefault ValueDescription
source-connection-nametextname of the source Zagreus connection
target-connection-nametextname of the target Zagreus connection
overwritebooleantrueIf "true", the specific resource with the same version will be overwritten on the target side. If false, the target will be left unchanged. If increment-version is set to true, overwrite attribute will be ignored.
all-versionsbooleanfalseIf "true", all versions of a resource will be migrated. If it is set to false, only the current version, or the specified version will be copied.
force-current-versionbooleanfalseIf "true", the copied resource will be set to current on the target side. This setting is ignored if all-versions is true.
keep-current-versiontextsource
target
sourceIf it is set to source, the source side version of the resource will be set on target after copying. If increment-version = true, the incremented one is set to current on the target side. If it is set to target, if there was an existing target resource, the current version will not be altered.
increment-versionbooleanfalseIf "true" all versions on the source side are saved as new versions (incremented ones) on the target side. If target was not existing, we copy simply all the versions as they are. Overwrite attribute is ignored in this case.
keep-idbooleantrueweather the migration process keeps the source ids for folders and other resources.
only-contentbooleanfalseIf it is "false", the migration process does not create the first parent folder, only scans its content recursively. It is the only way to rename a parent folder by migration, e.g.: source-name: /users/test, target-name=/users/test2.
keep-datesbooleantrueif set to "true", it keeps the original creation and modification times; if set to false, these will be set to the current server time
recursivebooleantrueThis setting is valid only if the source resource is a folder. If set to true, all the folder contents will be migrated recursively as well, otherwise only the folder will be created.
copy-filesystembooleantrueIf the content of the filesystem folder would be migrated. When it is set to false, no filesystem resources will be migrated. It works only in case of user migration. If "source-name" is a user and copy-filesystem="true", the content of the filesystem will be migrated as well. Otherwise only the metadata content will be copied on the target. If the source user name and the target user name are different you can use only-content="true" attribute to metadata and filesystem content will be in the right place.

Result Attributes

NameTypeDescription
migratedresourceslistA list of records (table) of the migrated resources.
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<zs:migrate xmlns:kafka="http://zagreus.com/kafka" source-connection-name="localhost" target-connection-name="remote" source-name="/admin/dev/script1" source-id="" target-folder-name="/admin/prod" target-folder-id="" overwrite="true" all-versions="true" force-current-version="false" keep-current-version="source" increment-version="false"/>
<zs:migrate xmlns:kafka="http://zagreus.com/kafka" source-connection-name="localhost" target-connection-name="remote" source-name="/admin/dev/script1|&amp;1.0.0.3" source-id="" target-folder-name="/admin/prod" target-folder-id="" overwrite="true" all-versions="false" force-current-version="false" keep-current-version="source" increment-version="false"/>
<zs:migrate xmlns:kafka="http://zagreus.com/kafka" source-connection-name="localhost" target-connection-name="remote" source-name="/admin/dev/script1" source-id="" target-folder-name="/admin/prod" target-folder-id="" overwrite="true" all-versions="true" force-current-version="false" keep-current-version="source" increment-version="true"/>
<zs:migrate xmlns:kafka="http://zagreus.com/kafka" source-connection-name="localhost" target-connection-name="remote" source-name="/admin/dev_folder" source-id="" target-folder-name="/admin/prod_folder" target-folder-id="" overwrite="true" all-versions="true" force-current-version="false" keep-current-version="source" increment-version="false"/>
<zs:migrate xmlns:kafka="http://zagreus.com/kafka" source-connection-name="localhost" target-connection-name="remote" source-name="/users/dev_user" source-id="" target-folder-name="/users" target-folder-id="" overwrite="true" all-versions="true" force-current-version="false" keep-current-version="source" increment-version="false" keep-id="false" only-content="false" keep-dates="false" recursive="true" copy-filesystem="true"/>
<zs:migrate xmlns:kafka="http://zagreus.com/kafka" source-connection-name="localhost" target-connection-name="remote" source-name="/users/dev_user" source-id="" target-folder-name="/users/prod_user" target-folder-id="" overwrite="true" all-versions="true" force-current-version="false" keep-current-version="source" increment-version="false" keep-id="false" only-content="true" keep-dates="false" recursive="true" copy-filesystem="true"/>

zs:move

Moves a resource to another folder, or renames it. The id of the resource remains the same.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
target-nametextthe new name of the resource
overwritetextCopy ofIf a resource with the name used already exists in the target folder, we can set with this attribute what will happen. Value "true" indicates that this file will be overwritten; value "false" indicates that no file will be created. If some other string is specified (like "Copy of "), it will be added to the beginning of the resource title; if there is also a resource with this name, the first free number will be added to the end (like "Copy of Test Script (16)").

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<zs:move xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" resource-name="/admin/BO/BO reportname" folder-name="/admin/TEST/" target-name="testscript"/>
<zs:move xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" resource-name="/admin/BO/BO reportname" target-name="BO reportname backup"/>

zs:option

Defines an option for a resource, job, user or group.

Attributes

NameTypePossible ValuesDefault ValueDescription
name*textthe name of the option
valuetextThe value of the option. If left blank, the content of the action will be used instead.

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<zs:setvariable xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" script-name="/admin/BO/BO reportname"> <zs:option name="engine.userlib">newuserlib</zs:option> </zs:setvariable>

zs:resourceinfo

Gives information about a specified resource.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription
nametext
idtext
fullpathtext
owneridnumber
parentidtext
creationtimedate
createdbynumber
modificationtimedate
modifiedbynumber
typetext
statusnameboolean
descriptiontext
contenttypetext
currentboolean
deletedboolean

Examples

<mail:send xmlns:kafka="http://zagreus.com/kafka" connection-name="gmail" from="zagreus@etixpert.com" to="testuser@etixpert.com" subject="sample pdf file"> <mail:attachment filename="sample01.pdf" content-type="application/pdf"> <zs:getresource connection-name="zsconnection" resource-name="/admin/testfolder/This is a PDF file.pdf"/> </mail:attachment> <mail:body>Test</mail:body> </mail:send>
<zs:getresource xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" resource-id="402881db1274034d011274e32e7e0002" output="samplescript.xml"/>

zs:runscript

Runs a script on the Zagreus server. Variables and options of the new job can also be set. If the execution is done in async mode, the result will be the ID of the job; otherwise the result will be the result of the job.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
asyncbooleantruethis attribute specifies the async mode of executing the script
sync-timeoutnumber0the amount of time (in ms) which we wait for the job to finish (only if async is false). -1 means infinite

Result Attributes

NameTypeDescription
jobidtextthe ID of the job
scriptidtextthe ID and version of the script to run
scriptpathtextthe path of the script to run
scriptnametextthe name and version of the script to run
beginexectimedatethe begin execution time of the script to run
beginqueuetimedatethe begin queue time of the script to run
endexectimedatethe end execution time of the script to run
endqueuetimedatethe end queue time of the script to run
execmodethe execution mode of the script to run
execprioritynumberthe execution priority of the script to run
numoflogsnumberthe numoflogs value of the script to run
statusnumberthe status of the script to run
statusnametextthe status name of the script to run
workeridnumberthe id of the worker
useridnumberthe id of the user
callertextthe caller of the script
callertypenumberthe type of the caller
callertypenametextthe name of the caller type
parentjobidtextthe id of the parent job
resulttimeoutnumberthe result time out
workercontrolleridnumberthe id of the worker controller
resulttypenumberthe type of the result
resulttextthe result
messagetextthe message
variablestextthe list of records (table) of the executed script
optionstextthe options
execution_timenumberthe length of time the action was executed

Examples

<zs:runscript xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" script-name="/admin/BO/BO documentname"> <zs:variable name="param1">value1</zs:variable> <zs:option name="engine.userlib">newuserlib</zs:option> </zs:runscript>

zs:runsubscription

Runs a subscription on the Zagreus server. The result will be the ID of the job.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
subscription-id*numberthe id of the subscription to run

Result Attributes

NameTypeDescription
jobidtextthe ID of the job
scriptidtextthe ID and version of the script to run
scriptpathtextthe path of the script to run
scriptnametextthe name and version of the script to run
beginexectimedatethe begin execution time of the script to run
beginqueuetimedatethe begin queue time of the script to run
endexectimedatethe end execution time of the script to run
endqueuetimedatethe end queue time of the script to run
execmodethe execution mode of the script to run
execprioritynumberthe execution priority of the script to run
numoflogsnumberthe numoflogs value of the script to run
statusnumberthe status of the script to run
statusnametextthe status name of the script to run
workeridnumberthe id of the worker
useridnumberthe id of the user
callertextthe caller of the script
callertypenumberthe type of the caller
callertypenametextthe name of the caller type
parentjobidtextthe id of the parent job
resulttimeoutnumberthe result time out
workercontrolleridnumberthe id of the worker controller
resulttypenumberthe type of the result
resulttextthe result
messagetextthe message
variablestextthe list of records (table) of the executed script
optionstextthe options
execution_timenumberthe length of time the action was executed

Examples

<zs:runsubscription xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" subscription-id="10"/>

zs:servercontrol

Executes a server control command with parameter specified as the content of the action. Multiple parameters must be added by ';' separated text. Returns the result of the command.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
command*textset-enable-queue
get-enable-queue
set-enable-scheduler
get-enable-scheduler
set-enable-runscript
get-enable-runscript
get-use-priority-algorithm
set-use-priority-algorithm
set-enable-filetrigger
get-enable-filetrigger
set-enable-watchers
get-enable-watchers
the name of the command

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<zs:servercontrol xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" command="set-enable-scheduler"> false </zs:servercontrol>

zs:setcurrent

Sets the current version of a script.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
version*textthe version to set as current

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<zs:setcurrent xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" resource-name="/admin/testfolder/sample script" version="1.2.2.1"/>

zs:setschedulesactivation

desc

Attributes

NameTypePossible ValuesDefault ValueDescription
nametextand
asddesc

Result Attributes

NameTypeDescription
asddesc

Examples

zs:setvariable

Defines variables and options for a resource, job, subscription, user or group. In case of script variable, if one needs to set the ordering of a particular variable, a special format of the key should be used, e.g. x:1 means that variable x will be saved as the first variable in the ordering.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
appendbooleantruedefines that the listed variables and options should be appended to the existing ones, or the old ones should first be cleared

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<zs:setvariable xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" script-name="/admin/BO/BO reportname"> <zs:variable name="param1">value1</zs:variable> <zs:option name="engine.userlib">newuserlib</zs:option> </zs:setvariable>
<zs:setvariable xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" account-name="admin"> <zs:variable name="param1">value1</zs:variable> </zs:setvariable>
<zs:setvariable xmlns:kafka="http://zagreus.com/kafka" subscription-id="4237"> <zs:variable name="email">user@yourdomain.com</zs:variable> </zs:setvariable>

zs:subscribe

Creates a new Zagreus subscription, which is a relation of a schedule and a script. Note that subscriptions can have variables and options specified, which will be used during the corresponding script executions. Note that in subscriptions versions are ignored and the current version is used.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
subscription-aliastextThe alias of the subscription
activebooleantruewhether the subscription should be active
reset-variablesbooleanfalseif set to true, the variables are first reset before setting the new ones (makes sense only when editing an existing subscription)
reset-optionsbooleanfalseif set to true, the options are first reset before setting the new ones (makes sense only when editing an existing subscription)

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<zs:createschedule xmlns:kafka="http://zagreus.com/kafka" connection-name="" schedule-name="testschedule" folder-name="/admin/temp" folder-id="" year="all" day-of-week="2" month="" day="" hour="12" minute="" second=""/> <zs:subscribe xmlns:kafka="http://zagreus.com/kafka" connection-name="" subscription-id="" script-id="" script-name="/groups/public/Tutorial/File/Script 06 - File Read" schedule-id="" schedule-name="/admin/temp/testschedule" subscription-alias="" active="true" reset-variables="false" reset-options="false" alias="subscribeRes"/>

zs:subscriptionlist

Lists the subscriptions of the given type. If no attributes are set, no filtering is done, and the action returns all subscriptions of the actual user.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
subscription-idnumberThe id of the subscription. If it is set, only the given subscription will be listed, and the other attributes will be ignored.
script-idtextthe id of the resource to get its subscriptions
script-nametextthe full path of the resource to get its subscriptions
schedule-idtextthe id of the resource to get its subscriptions
schedule-nametextthe full path of the resource to get its subscriptions
subscription-aliastextthe alias of the subscriptions to filter. A part of the alias is enough to match. When subscription-id is used in the action, subscription-alias will be ignored.
activebooleanif set, only the subscriptions with the given activation status will be listed

Result Attributes

NameTypeDescription
rowcntthe number of subscriptions found
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription
subscriptionidnumber
subscription-alias
scriptid
scriptname
scriptpath
scheduleid
schedulename
schedulepath
scheduledby
activeboolean
creationtimedate
variables
options

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka">List all subscriptions</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <zs:subscriptionlist connection-name="zsconnection"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka">List all active subscriptions for one script</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <zs:subscriptionlist connection-name="zsconnection" script-name="/admin/BO/BO reportname" active="true"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka">List one subscription</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <zs:subscriptionlist connection-name="zsconnection" subscription-id="1848"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka">List all passive subscriptions for one script and one schedule</z:log> <z:log xmlns:kafka="http://zagreus.com/kafka"> <zs:subscriptionlist connection-name="zsconnection" script-name="/admin/BO/BO reportname" schedule-name="/admin/BO/every sunday" active="false"/> </z:log>

zs:unsubscribe

Removes the assignation of a time or event schedule to a script. If no subscription ID is specified, both script-name/ID and schedule-name/ID must be specified.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
subscription-idnumberThe id of the subscription. If it is set, only the given subscription will be deleted, and the other attributes will be ignored.
script-idtextthe id of the script for the subscriptions to delete
script-nametextthe full path of the script for the subscriptions to delete
schedule-idtextthe id of the time or event schedule for the subscriptions to delete
schedule-nametextthe full path of the time or event schedule for the subscriptions to delete
activebooleanif set, only the subscriptions with the given activation status will be deleted

Result Attributes

NameTypeDescription
rowcntnumberthe number of subscriptions deleted
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka">Deleting one subscription</z:log> <zs:unsubscribe xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" subscription-id="1848"/>
<z:log xmlns:kafka="http://zagreus.com/kafka">Deleting all subscriptions for one script</z:log> <zs:unsubscribe xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" script-name="/admin/sample script"/>
<z:log xmlns:kafka="http://zagreus.com/kafka">Deleting all inactive subscriptions for one schedule</z:log> <zs:unsubscribe xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" schedule-name="/admin/sample schedule" active="false"/>
<z:log xmlns:kafka="http://zagreus.com/kafka">Deleting all active subscriptions for one script AND one schedule (these conditions are AND-ed, so the script and the schedule both can have subscriptions left)</z:log> <zs:unsubscribe xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" script-name="/admin/sample script" schedule-name="/admin/sample schedule" active="true"/>

zs:userlist

Lists the users on a remote Zagreus server.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
idtextthe ids of the accounts to list; can be separated by ;s
nametextthe names of the accounts to list; can be separated by ;s
only-logged-inbooleanfalsethis attribute sets whether we should list the users who are currently logged in

Result Attributes

NameTypeDescription
rowcntnumberthe number of users found
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription
userid
username
title
firstname
lastname
adminboolean
lastloggedindate
lastactivitydate
loggedinboolean
clienttype
loggedinaddress
description

Examples

<z:log xmlns:kafka="http://zagreus.com/kafka"> <zs:userlist connection-name="zsconnection" name="admin;testuser"/> </z:log>
<z:log xmlns:kafka="http://zagreus.com/kafka"> <zs:userlist connection-name="zsconnection" only-logged-in="true"/> </z:log>

zs:variable

Defines a variable for a resource, job, user or group.

Attributes

NameTypePossible ValuesDefault ValueDescription
name*textthe name of the variable
valuetextThe value of the variable. If left blank, the content of the action will be used instead.

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<zs:setvariable xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" script-name="/admin/BO/BO reportname"> <zs:variable name="param1" value="value1"/> </zs:setvariable>
<zs:runscript xmlns:kafka="http://zagreus.com/kafka" connection-name="zagreus" script-name="/admin/TEST/setvariable test"> <zs:variable name="b">ddd</zs:variable> </zs:runscript>

zs:wait

Waits until the execution of a job is finished. If the execution has been already finished, the action does not wait at all.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
job-id*textjob identifier, returned by the zs:runscript action

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Result Table

NameTypePossible ValuesDescription

Examples

<zs:runscript xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" script-name="/admin/BO/BO documentname" alias="jobId"/> <zs:wait xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" job-id="$jobId"/>

zs:workercontrol

Executes a worker control command.

Attributes

NameTypePossible ValuesDefault ValueDescription
connection-nametextname of the ZS connection used; if left empty, the action will work on the Zagreus server on which the current script is running
command*textstart
stop
restart
enable
disable
the name of the command
worker-controller-id*numberthe id of the worker controller
worker-id*numberthe id of the worker

Result Attributes

NameTypeDescription
execution_timenumberthe length of time the action was executed

Examples

<zs:workercontrol xmlns:kafka="http://zagreus.com/kafka" connection-name="zsconnection" command="restart" worker-controller-id="1" worker-id="3"/>

common attributes:common_attributes

action-attributes

If specified, the attributes of the given action will be stored in the specified variable, then they can be referenced the action-attributes value and the proper attribute name. See example.

Examples

<db:sql connection-name="sql" action-attributes="aa">delete from table</db:sql> <z:log>Connection name has been used: ${aa.connection-name}</z:log>

alias

If specified, the result of the action will be stored in the specified variable.

alias-global

If specified, the result of the action will be stored in the specified global variable.

alias-local

If specified, the result of the action will be stored in the specified local variable.

date-format

The date / time type results of the action will be formatted by the specified date-format. Default is: YYYY-MM-dd for dates, HH:mm:ss.SSS for time.

debug-output

If specified, and the script is executed in debug mode the results of the action will be saved to the given location. If the result contains more items, and these items have no binary content, all the items will be stored in the same file, separated by the newline character. In the case of binary content only the item references will be displayed.

eval-output

If true, the generated result will parsed as script expression.

label

This is the label attribute for goto connections in the script logic. For managing goto connections, right-click the action and select "Manage goto expressions..." in the graph editor.

log

If true, the generated result will be logged.

log-attributes

If true, the attributes of the action will be logged.

log-result-attributes

If true, the result attributes of the action will be logged.

logfile

Specifies a custom log target.

loglevel

This attribute sets the logging level, available values: user, info, warning, error, debug.

newline-char

The line separator character, used when writing files. Default value is platform-dependent: for Linux, for Windows.

null-format

The format of the "null" elements in the result of the action. "_empty" refers to an empty string, otherwise the given text will be used. Default value is "".

number-format

The numeric type results of the action will be formatted by the specified number-format. The format sets the position of thousand separator character(s) and one decimal separator character. In the value, thousand separator character is always comma, while decimal separator character is dot. There can be multiple thousand separator characters and only one decimal separator character in a format definition. E.g.: 0,000.00 or ###,000,000.000 To change the displayed thousand and decimal separator characters, use attribute "number-language-format".

number-language-format

It sets the locale to number formatting (decimal points, thousands separator), e.g.: en, de, hu. Displays the appropriate thousand separator character - comma, space or dot - and decimal separator character - comma or dot - according to the given locale code.

no-text-parsing

If true, the text element of the action will not be parsed (evaluating expressions / variables will not happen).

no-result

If true, the generated result of the action will not be used.

on-error-next-child

If yes, it directs the system that when an error happens during processing of a child action, the execution will continue on the next child action. Otherwise the processing of the caller action will be stopped.

on-error-next-sibling

If yes, it directs the system that when an error happens during processing of an action, the execution will continue on the next sibling action. Otherwise the error handling will be forwarded to the parent action, see common attribute on-error-next-child.

output

If specified, the results of the action will be saved to the given location. If the result contains more items, and these items have no binary content, all the items will be stored in the same file, separated by the newline character. In the case of binary content the items are save the same way as described at attribute output-separated.

output-encoding

It specifies the encoding of the file defined by output and debug-output attributes.

output-separated

if specified, the results of the action will be saved to the locations derived from the given name. The generated filenames are built from the base part of the given output filename, followed by an underscore and the item name (or its index if name is not available) and finally the extension part. Also see action file:write.

result-attributes

If specified, the result attributes will be stored in the specified variable. Otherwise the variable namespace_actorname will be used. For example the default variable for mstr:report result attributes is mstr_report. This attribute will be ignored if result-attributes-global is set

result-attributes-global

If specified, the result attributes will be stored in the specified global variable.

test-expr

It evaluates the value expression of this attribute, and skips action execution if the result is false.

system:function-categories

system:functions

NameReturn TypeDescription
abs(number)number Gives back the absolute value of the number.
binary(text)binary Decodes the input text using BASE64. Note that in the log output the original BASE64 text is shown!
boolean(input-object)boolean Returns a boolean type from the input.
capitalize(text)text Capitalizes the input text: the first letter of each word will be in upper case, while the rest will be in lower case.
coalesce(input-object1, input-object2, ...)object Returns the first non-null parameter.
concat(input-object)text Concatenates the elements of input-object (for example, if it is a record or table).
concat(input-object, delimiter-text)text Concatenates the elements of input-object (for example, if it is a record or table) with the specified delimiter.
concatobject(input-object, input-object)object Concatenates the elements of the two input-objects. Returns the same type as the first input-object. The possible types of the parameters are: binary, text, list and record types.
contains(text, search-text)boolean Returns 'true' if 'text' contains 'search-text'.
createid(id-text)text Creates a fully qualified resource ID with the default version.
createid(id-text, version-text)text Creates a fully qualified resource ID.
date(date-text)date Returns a date type from the input text with the default date format (yyyy-MM-dd).
date(date-text, date-format-text)date Returns a date type from the input text using the specified date format.
dateadd(date-part-text, number, date)date Returns a new date. The specified date-part will be increased/decreased by the number specified.
datediff(date-part-text, date1, date2)number Returns the difference between date1 and date2 in terms of date-part-text (e.g. months, days etc.). Always a non-negative value.
datepart(date-part-text, date)number Returns a number that represents the specified datepart of the specified date.
decode(input-text)binary Decodes the input text using BASE64. Note that in the log output the original BASE64 text is shown!
decode(input-object, method)binary Decodes the input object using the method specified; can be 'BASE64' and 'AES-256-CBC' (or 'AES-256').
decode(input-object, method, key)binary Decodes the input object using the method specified; can be 'BASE64' and 'AES-256-CBC' (or 'AES-256'). For AES-256, the 'key' parameter is used as well
decode(input-object, method, key, iv)binary Decodes the input object using the method specified; can be 'BASE64' and 'AES-256-CBC' (or 'AES-256'). For AES-256, the 'key' and 'iv' parameters are used as well
encode(input-object)text Encodes the input object in BASE64.
encode(input-object, method)text Encodes the input object using the method specified; can be 'BASE64' and 'AES-256-CBC' (or 'AES-256').
encode(input-object, method, key)text Encodes the input object using the method specified; can be 'BASE64' and 'AES-256-CBC' (or 'AES-256'). For AES-256, the 'key' parameter is used as well
encode(input-object, method, key, iv)text Encodes the input object using the method specified; can be 'BASE64' and 'AES-256-CBC' (or 'AES-256'). For AES-256, the 'key' and 'iv' parameters are used as well
endswith(text, search-text)boolean Returns 'true' if 'text' ends with 'search-text'.
eval(text)object Evaluates 'text'.
floor(number)number Returns the floor value of the number.
format(input-object, format-specifier)object Sets the format described by format-specifier to the given input-object. Returns the same type as the input. NOTE: It won't create a new object, only affects the format of the original object!
getidpart(input-text)text Returns only the ID part (i.e. without the version) of the full resource ID.
getversionpart(input-text)text Returns only the version of the full resource ID. For null returns the default version (i.e. '1.0.0.0').
gettype(input-object)text Returns the type of the given input-object.
hash(input-object)number Returns the hash value of the object.
index(text, search-text)number Returns the index of the first occurrence of search-text in text. -1 if text does not contain search-text.
isboolean(input-object)boolean Returns whether input-object is of boolean type.
isbinary(input-object)boolean Returns whether input-object is of binary type.
isdate(input-object)boolean Returns whether input-object is of date type.
isdefined(input-object)boolean Returns whether input-object can be evaluated (e.g. variable is defined, array element exists).
islist(input-object)boolean Returns whether input-object is of list type.
isnull(input-object)boolean Returns whether input-object is null.
isnumber(input-object)boolean Returns whether input-object can be parsed as a number.
isrecord(input-object)boolean Returns whether input-object is of record type.
istext(input-object)boolean Returns whether input-object is of text type.
istime(input-object)boolean Returns whether input-object is of time type.
isxml(input-object)boolean Returns whether input-object is of XML type.
keys(record)record Returns a record containing the keys of the input record.
left(text, number)text Returns the left part of a text with the specified number of characters.
length(input-object)number Returns the length of the input object. Types are: text, record, list, table, binary
list(input-object)list Returns a list containing the elements of input-object (if it is iterable) or input-object itself.
locate(text, search-text)number Returns the index of the first occurrence of search-text in text. -1 if text does not contain search-text.
lower(text)text Return the input text in lower case.
ltrim(text)text Returns a character string after truncating all leading blanks.
mod(number, number)number Returns the remainder after division. Works only for integers.
number(input-object)number Returns a number type from the input-object.
number(input-object, format-text)number Returns a number type from the input-object using the given format.
number(input-object, format-text, language-text)number Returns a number type from the input-object using the given format specific to the given language.
purge() Calls the Java garbage collector.
println(input-object) Prints the given input-object.
reverse(text)text Returns the input text reversed.
repeat(text, number)text Returns the input text repeated the specified number of times.
replace(text, source-text, target-text)text Returns the input text where all occurrences of source-text are replaced by target-text.
right(text, number)text Returns the right part of a text with the specified number of characters.
rlocate(text, search-text)number Returns the index of the last occurrence of search-text in text. -1 if text does not contain search-text.
rand()number Returns a random value with an uniform distribution in the range [0, 1).
rand(number)number Returns a random value with an uniform distribution in the range [0, param).
randn()number Returns a random value with a normal (i.e. Gaussian) distribution.
round(number)number Returns the rounded value of the number.
rtrim(text)text Returns a character string after truncating all trailing blanks.
sleep(number) Waits for the specified amount of milliseconds.
split(text, regular-expression-text)list Returns a list containing the split parts of the input text.
startswith(text, search-text)boolean Returns 'true' if 'text' starts with 'search-text'.
stringdiff(text1, text2)text Returns the part of the second string which is not found in the first string. If the second string is empty or it is null, returns the first string.
substring(text, start-position-number)text Returns the substring of the input text starting at the specified position.
substring(text, start-position-number, end-position-number)text Returns the substring of the input text starting at the specified start position and ending at the specified end position. Both positions are inclusive.
text(input-object)text Returns a text type from the input-object.
text(input-object, encoding)text Returns a text type from the input-object using the specified character encoding.
time(time-text)time Returns a time type from the input text with the default time format (HH:mm:ss.SSS).
time(time-text, time-format-text)time Returns a time type from the input text using the specified time format.
translate(input-text, source-text, target-text)text All characters of input-text will be replaced with the corresponding character in target-text based on source text.
trim(text)text Returns a character string after truncating all leading and trailing blanks.
upper(text)text Return the input text in upper case.
urlencode(text)text URL-encodes the input text.
workingday(date)boolean Returns 'true' if the given date is a working day for the country specified by the default locale.
workingday(date, language-text)boolean Returns 'true' if the given date is a working day for the given country.
workingdayofmonth(date)number Returns which working day of the month is the date specified. E.g. for 2020-05-13 (which is a Wednesday) returns 8.
workingdayofmonth(date, language-text)number Returns which working day of the month is the date specified for the given country. E.g. for 2020-05-13 (which is a Wednesday) returns 8.
workingdaysafter(date, number)date Increments the input date by the number of working days specified.
workingdaysafter(date, number, language-text)date Increments the input date by the number of working days specified for the given country.
xmltype(xml-text)xml Returns an XML type from the input text.

system:options

system:variables

NameTypeDescription
datedate Gives back the current date.
jobIdtext Variable for the current job id.
callerNametext The user name who runs the script. If the script was scheduled, it returns the schedule id. If it was run by zs:runscript, it is the caller script id.
callerTypetext Return values can be: "scheduler", "event", "gui", "script" (zs:runscript locally), "remote script" (zs:runscript remotely), "autorun", "webservice".
callerIPtext When the script was run remotely by zs:runscript, it stores the caller server IP address.
currentActionNumbertext The currently executed action ordering number.
currentUserIdtext The user id who is running the script.
executionModetext Return values can be: "direct", "scheduled", "fired"
errorMessagetext The last error message.
errorTracetext The last error stack trace.
parallelThreadIdnumber The id of the actual thread for z:foreach
queueTimeoutnumber The queue timeout applied for this script.
runTimeoutnumber The running timeout applied for this script.
scheduleIdtext The id of the schedule that runs the script.
scheduleNametext The name of the schedule that runs the script.
schedulePathtext The name of the schedule that runs the script.
scriptIdtext The id of the current script.
scriptDesctext The description of the current script.
scriptNametext The name of the current script.
scriptParentFoldertext The parent folder path of the current script.
scriptPathtext The path of the current script.
scriptVersiontext The version of the current script.
serverHosttext The host of the Zagreus Server.
serverOStext The operating system of the Zagreus Server.
serverPorttext The port of the Zagreus Server.
serverWorkingFoldertext The working folder root of the Zagreus Server.
startingVariablestabular The (resolved) starting variables of the actual script.
stackTracetext The stacktrace of the last error.
subscriptionIdtext If the script was run by a scheduled subscription, it returns the subscription id.
threadIdnumber The current thread id.
timetime The current time.
workerOStext The OS of the worker.
zagreusVersiontext The current version of the Zagreus System.