This might be a bit of a necient question so excuse my newbieness in the
area of User App...

I have created a PRD which works fine, now I want to use the
start-workflow verb to kick it off based on a trigger from a job.

I created the policy, it seems to start the workflow, but fails. I do
set a string for the reason and the recipient in LDAP format, that
seems to be what the workflow is looking for...but when it gets to the
Addressee of the first approval step it fails because it cannot find
the user's manager.

Second question is how do I change this to use a different
relationship, I will eventually want it so use a different attribute as
the approver instead of managerދ

<?xml version="1.0" encoding="UTF-8"?><policy>
<rule>
<description>[TWC] Start VPN Reauthorization Workflow</description>
<conditions>
<and>
<if-operation op="equal">trigger</if-operation>
</and>
<and>
<if-op-attr name="twcAccountExpirations" op="changing"/>
</and>
</conditions>
<actions>
<do-set-local-variable name="VPN-DRIVER-DN">
<arg-string>
<token-text
xml:space="preserve">\TWC-LAB\LAB\SERVICES\IDVAULT\IDVault - VPN
Driver</token-text>
</arg-string>
</do-set-local-variable>
<do-for-each>
<arg-node-set>
<token-src-attr name="twcAccountExpirations"/>
</arg-node-set>
<arg-actions>
<do-if>
<arg-conditions>
<and>
<if-xpath
op="true">$current-node/component[@name='serverDn']/text()=$VPN-DRIVER-DN</if-xpath>
</and>
</arg-conditions>
<arg-actions>
<do-set-local-variable name="NOW">
<arg-string>
<token-time format="!CTIME" tz="UTC"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="WHEN">
<arg-string>
<token-xpath
expression="(~advance-warning~*24*60*60)+number($NOW)"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="EXPIRATION-TIME">
<arg-string>
<token-xpath
expression="number($WHEN)-number($current-node/component[@name='remoteId']/text())"/>
</arg-string>
</do-set-local-variable>
<do-if>
<arg-conditions>
<and>
<if-xpath op="true">$EXPIRATION-TIME &lt; 86400</if-xpath>
<if-xpath op="true">$EXPIRATION-TIME > 0</if-xpath>
</and>
</arg-conditions>
<arg-actions>
<do-start-workflow id="CN=admin,OU=SERVICES,O=LAB"
url="http://165.237.137.135:8080/IDM"
workflow-id="CN=VPN,CN=RequestDefs,CN=AppConfig,CN=UserAppl ication35,CN=IDVAULT,OU=SERVICES,O=LAB">
<arg-password>
<token-text xml:space="preserve">********</token-text>
</arg-password>
<arg-dn>
<token-src-dn/>
</arg-dn>
<arg-string name="reason">
<token-text xml:space="preserve">Automated Reauthorization
Request. This account's VPN access will expire </token-text>
<token-convert-time dest-format="!FULL.DATETIME"
dest-lang="en-US" dest-tz="America/New_York" src-format="!CTIME"
src-tz="UTC">
<token-xpath
expression="$current-node/component[@name='remoteId']/text()"/>
</token-convert-time>
</arg-string>
<arg-string name="recipient">
<token-parse-dn dest-dn-format="ldap">
<token-xpath expression="@qualified-src-dn"/>
</token-parse-dn>
</arg-string>
</do-start-workflow>
</arg-actions>
<arg-actions/>
</do-if>
</arg-actions>
<arg-actions/>
</do-if>
</arg-actions>
</do-for-each>
</actions>
</rule>
</policy>


Process Comments
Date Activity User Comments
05/28/2008 05:21:46 PM Start IDMProv Workflow Started
05/28/2008 05:21:46 PM Start IDMProv Forwarded
05/28/2008 05:21:46 PM Single Approval IDMProv Workflow Error:
Activity Id [approval]: Addressee
[IDVault.get(recipient,'user','manager')] evaluation failed or is
null.

[05/28/08 17:33:54.918]:UserApplication35 ST: Arg
Value: "-- suppressed --".
[05/28/08 17:33:54.919]:UserApplication35 ST:
arg-dn(token-src-dn())
[05/28/08 17:33:54.920]:UserApplication35 ST:
token-src-dn()
[05/28/08 17:33:54.921]:UserApplication35 ST:
Token Value: "\TWC-LAB\LAB\EMPLOYEES\ACTIVE\ABoozer".
[05/28/08 17:33:54.922]:UserApplication35 ST: Arg
Value: "\TWC-LAB\LAB\EMPLOYEES\ACTIVE\ABoozer".
[05/28/08 17:33:54.923]:UserApplication35 ST:
reason("Automated Reauthorization Request. This account's VPN access
will expire
"+token-convert-time(dest-format="!FULL.DATETIME",dest-lang="en-US",dest-tz="America/New_York",src-format="!CTIME",src-tz="UTC",token-xpath("$current-node/component[@name='remoteId']/text()")))
[05/28/08 17:33:54.926]:UserApplication35 ST:
token-text("Automated Reauthorization Request. This account's VPN
access will
expire ")
[05/28/08 17:33:54.928]:UserApplication35 ST:
token-convert-time(dest-format="!FULL.DATETIME",dest-lang="en-US",dest-tz="America/New_York",src-format="!CTIME",src-tz="UTC",token-xpath("$current-node/component[@name='remoteId']/text()"))
[05/28/08 17:33:54.930]:UserApplication35 ST:
token-convert-time(dest-format="!FULL.DATETIME",dest-lang="en-US",dest-tz="America/New_York",src-format="!CTIME",src-tz="UTC",token-xpath("$current-node/component[@name='remoteId']/text()"))
[05/28/08 17:33:54.932]:UserApplication35 ST:
token-xpath("$current-node/component[@name='remoteId']/text()")
[05/28/08 17:33:54.933]:UserApplication35 ST:
Token Value: "1213243500".
[05/28/08 17:33:54.935]:UserApplication35 ST:
Arg Value: "1213243500".
[05/28/08 17:33:54.937]:UserApplication35 ST:
Token Value: "Thursday, June 12, 2008 12:05:00 AM EDT".
[05/28/08 17:33:54.937]:UserApplication35 ST: Arg
Value: "Automated Reauthorization Request. This account's VPN access
will
expire Thursday, June 12, 2008 12:05:00 AM EDT".
[05/28/08 17:33:54.939]:UserApplication35 ST:
recipient(token-parse-dn(dest-dn-format="ldap",token-xpath("@qualified-src-dn")))
[05/28/08 17:33:54.940]:UserApplication35 ST:
token-parse-dn(dest-dn-format="ldap",token-xpath("@qualified-src-dn"))
[05/28/08 17:33:54.942]:UserApplication35 ST:
token-parse-dn(dest-dn-format="ldap",token-xpath("@qualified-src-dn"))
[05/28/08 17:33:54.944]:UserApplication35 ST:
token-xpath("@qualified-src-dn")
[05/28/08 17:33:54.944]:UserApplication35 ST:
Token Value: "O=LAB\OU=EMPLOYEES\OU=ACTIVE\CN=ABoozer".
[05/28/08 17:33:54.945]:UserApplication35 ST:
Arg Value: "O=LAB\OU=EMPLOYEES\OU=ACTIVE\CN=ABoozer".
[05/28/08 17:33:54.947]:UserApplication35 ST:
Token Value: "CN=ABoozer,OU=ACTIVE,OU=EMPLOYEES,O=LAB".
[05/28/08 17:33:54.948]:UserApplication35 ST: Arg
Value: "CN=ABoozer,OU=ACTIVE,OU=EMPLOYEES,O=LAB".
[05/28/08 17:33:55.239]:UserApplication35 ST:
DirXML Log Event -------------------
Driver: \TWC-LAB\LAB\SERVICES\IDVAULT\UserApplication35
Channel: Subscriber
Status: Success
Message: Started workflow
WorkflowID:
CN=VPN,CN=RequestDefs,CN=AppConfig,CN=UserApplicat ion35,CN=IDVAULT,OU=SERVICES,O=LAB
Recipient: \TWC-LAB\LAB\EMPLOYEES\ACTIVE\ABoozer


--
rrawson
------------------------------------------------------------------------
rrawson's Profile: http://forums.novell.com/member.php?userid=4898
View this thread: http://forums.novell.com/showthread.php?t=330375