Start date and End Date

Hi,

Working on a create user workflow i need to add a mandatory start date
for the user and an optional end date for some users.

I have two fields for this in the request form of type date and control
Type is DatePicker.

There is an eDirectory attribute called loginActivationTime, is that
used for activating an account at the preset time?

End date, is that Login Expiration Time ?

And I think I have to repormat the dates as well ?
I have found some discussions about date formats but what is the best
practice on how to do a reformat if I use IDM 3.6 and UA3.6.1 ?
I guess I will do a reformat in the data Item Mapping for the Entity
activity ?

Thanks


-- 
joakim_ganse
------------------------------------------------------------------------



0
joakim
3/17/2009 10:16:01 AM
novell.id-manager.userapp 4379 articles. 0 followers. Follow

19 Replies
1234 Views

Similar Articles

[PageSpeed] 18

On 03/17/2009 05:16 AM, joakim ganse wrote:

> Hi,
> 
> Working on a create user workflow i need to add a mandatory start date
> for the user and an optional end date for some users.
> 
> I have two fields for this in the request form of type date and control
> Type is DatePicker.
> 
> There is an eDirectory attribute called loginActivationTime, is that
> used for activating an account at the preset time?
> 
> End date, is that Login Expiration Time ?
> 
> And I think I have to repormat the dates as well ?
> I have found some discussions about date formats but what is the best
> practice on how to do a reformat if I use IDM 3.6 and UA3.6.1 ?
> I guess I will do a reformat in the data Item Mapping for the Entity
> activity ?
> 
> Thanks
> 
> 


Converting the date, something like:

function setDateTime1()  {
/*
   convert date from entry on workflow to eDirectory format
  date or datetime picker is used to pick the date
*/
    var edirFormat = new java.text.SimpleDateFormat("yyyyMMddhhmmssZ");
    var workflowFormat = new
java.text.SimpleDateFormat("yyyyMMddhhmmssSSSZ");
    try {
        var tempDate = workflowFormat.parse(flowdata.get('timepicked'));
    } catch (err) {
        return err
    }
    return edirFormat.format(tempDate);

};
setDateTime1();

Which has been discussed in this forum in the past.

As far as using the dates you indicated that appears to be what you
want, there is an example in the docs doing something similar with the
workorder driver.

http://www.novell.com/documentation/idm36drivers/work_order/data/b8tkyep.html

0
John
3/17/2009 11:33:04 AM
> Converting the date, something like:
> 
> function setDateTime1()  {
> /*
>    convert date from entry on workflow to eDirectory format
>   date or datetime picker is used to pick the date
> */
>     var edirFormat = new java.text.SimpleDateFormat("yyyyMMddhhmmssZ");
>     var workflowFormat = new
> java.text.SimpleDateFormat("yyyyMMddhhmmssSSSZ");
>     try {
>         var tempDate = workflowFormat.parse(flowdata.get('timepicked'));
>     } catch (err) {
>         return err
>     }
>     return edirFormat.format(tempDate);
> 
> };
> setDateTime1();

So John, is there any chance of getting the DirXML Script style 
Time/Convert Time tokens rolled into UA as a built in function?

Also, time comes in that format (yyyyMMddhhmmssZ), not CTIME out of eDir?

Is that the DAL converting the formating?  If not, I miss seeing the 
conversion from CTIME in there.  (Trying to learn here...)

> Which has been discussed in this forum in the past.
> 
> As far as using the dates you indicated that appears to be what you
> want, there is an example in the docs doing something similar with the
> workorder driver.
> 
> http://www.novell.com/documentation/idm36drivers/work_order/data/b8tkyep.html
> 
0
Geoffrey
3/17/2009 11:41:20 AM
Thanks John,

I will try this.
This is such an ordinary thing to do I am surprised there is no simpler
way to transform the UA time format to eDir format.
Hope this will get added in future versions.

/Joakim


-- 
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: http://forums.novell.com/member.php?userid=6236
View this thread: http://forums.novell.com/showthread.php?t=364179

0
joakim
3/17/2009 2:16:03 PM
On Tue, 17 Mar 2009 11:41:20 +0000, Geoffrey Carman wrote:

> So John, is there any chance of getting the DirXML Script style
> Time/Convert Time tokens rolled into UA as a built in function?

That would be nice.

> Also, time comes in that format (yyyyMMddhhmmssZ), not CTIME out of
> eDir?

UA is basically doing everything via LDAP, so you get CTIME to text 
translation of time formatted attributes.

-- 
---------------------------------------------------------------------------
 David Gersic                                            dgersic_@_niu.edu
 Novell Knowledge Partner                         http://forums.novell.com

 Please post questions in the newsgroups.   No support provided via email.

0
David
3/17/2009 6:30:40 PM
On 03/17/2009 01:30 PM, David Gersic wrote:

> On Tue, 17 Mar 2009 11:41:20 +0000, Geoffrey Carman wrote:
> 
>> So John, is there any chance of getting the DirXML Script style
>> Time/Convert Time tokens rolled into UA as a built in function?
> 
> That would be nice.
> 


Personally I like using the SimpleDateFormat class directly, but then
call me a Java programmer at heart.  :)

But I think a ECMAScript Variable function would be nice. I will an
enhancement request.

>> Also, time comes in that format (yyyyMMddhhmmssZ), not CTIME out of
>> eDir?
> 
> UA is basically doing everything via LDAP, so you get CTIME to text 
> translation of time formatted attributes.
> 


Exactly. And because it is passed in this format it has to be returned
back in the same format when updating it through the entity activity.
0
John
3/17/2009 10:21:14 PM
I still have no luck with this.

I have tried to add your cod in the data Item Mapping for the Entity
activity and I have tried to add an mapping activity before the entity
activity with the same code.

I also restricted to just write Login Expiration Time and it is set to
string in the Dal.

I attach a zip file with two rtf files in, one successful create and
one not successful.
In the beginning of the create I do a search for account so the ldap
search error is meant to be.

The only difference between the two creration attempts is that the
successful one did not have the end date.

Is there a better way to trace this ? I can't see why the user does not
get created.


+----------------------------------------------------------------------+
|Filename: enddate.zip                                                 |
|Download: http://forums.novell.com/attachment.php?attachmentid=2497   |
+----------------------------------------------------------------------+

-- 
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: http://forums.novell.com/member.php?userid=6236
View this thread: http://forums.novell.com/showthread.php?t=364179

0
joakim
3/18/2009 1:26:02 PM
On 03/18/2009 08:26 AM, joakim ganse wrote:

> I still have no luck with this.
> 
> I have tried to add your cod in the data Item Mapping for the Entity
> activity and I have tried to add an mapping activity before the entity
> activity with the same code.
> 
> I also restricted to just write Login Expiration Time and it is set to
> string in the Dal.
> 
> I attach a zip file with two rtf files in, one successful create and
> one not successful.
> In the beginning of the create I do a search for account so the ldap
> search error is meant to be.
> 


Create a test workflow that retrieves the value from the attribute using
IDVault.get

Then print that out to see what the format is of the date.

You can use:

Packages.java.lang.System.out.println()

In a Mapping Activity to write out to the server.log file.

> The only difference between the two creration attempts is that the
> successful one did not have the end date.
> 
> Is there a better way to trace this ? I can't see why the user does not
> get created.
> 


Yes, but you need to go into the User Application as an Administrator
and turn the log up to trace. This is under Logging.

I think the one you need is:

com.novell.soa.af.impl.activity

0
John
3/19/2009 12:29:04 AM
On 03/17/2009 01:30 PM, David Gersic wrote:

> On Tue, 17 Mar 2009 11:41:20 +0000, Geoffrey Carman wrote:
> 
>> So John, is there any chance of getting the DirXML Script style
>> Time/Convert Time tokens rolled into UA as a built in function?
> 
> That would be nice.
> 

Entered enhancement request in Bugzilla 487575.

0
John
3/21/2009 1:09:37 PM
Still struggling with dates..
When adding a date to the user in iManager and displaying it with
IDVault.get i see this: 20090625220000Z

Choosing the same date with date picker in workflow and then displaying
it with form.alert i see this: 20090626000000+0100

I guess this is as expected.

After this I have an mapping activity that includes this code:
function setDateTime1() {
/*
convert date from entry on workflow to eDirectory format
date or datetime picker is used to pick the date
*/
var edirFormat = new java.text.SimpleDateFormat("yyyyMMddhhmmssZ");
var workflowFormat = new
java.text.SimpleDateFormat("yyyyMMddhhmmssSSSZ");
try {
var tempDate = workflowFormat.parse(flowdata.get('timepicked'));
} catch (err) {
return err
}
return edirFormat.format(tempDate);

};
setDateTime1();

where I have exchanged 'timepicked' with my field name.

And last I have an entity activity that do replace all to a string
defined target attribute.

Something is wrong in this chain since the user does not get created if
I add this date but does get created without it.

This seems to be such a common thing to do, judging on the threads in
the forum but it just won't work.

any suggestions of how to troubleshoot this ?


-- 
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: http://forums.novell.com/member.php?userid=6236
View this thread: http://forums.novell.com/showthread.php?t=364179

0
joakim
3/26/2009 10:16:02 AM
On 03/26/2009 04:16 AM, joakim ganse wrote:

> Still struggling with dates..
> When adding a date to the user in iManager and displaying it with
> IDVault.get i see this: 20090625220000Z
> 
> Choosing the same date with date picker in workflow and then displaying
> it with form.alert i see this: 20090626000000+0100
> 
> I guess this is as expected.
> 
> After this I have an mapping activity that includes this code:
> function setDateTime1() {
> /*
> convert date from entry on workflow to eDirectory format
> date or datetime picker is used to pick the date
> */
> var edirFormat = new java.text.SimpleDateFormat("yyyyMMddhhmmssZ");
> var workflowFormat = new
> java.text.SimpleDateFormat("yyyyMMddhhmmssSSSZ");
> try {
> var tempDate = workflowFormat.parse(flowdata.get('timepicked'));
> } catch (err) {
> return err
> }
> return edirFormat.format(tempDate);
> 
> };
> setDateTime1();
> 
> where I have exchanged 'timepicked' with my field name.
> 
> And last I have an entity activity that do replace all to a string
> defined target attribute.
> 
> Something is wrong in this chain since the user does not get created if
> I add this date but does get created without it.
> 
> This seems to be such a common thing to do, judging on the threads in
> the forum but it just won't work.
> 
> any suggestions of how to troubleshoot this ?
> 
> 


Any errors in the server log?

Try turning up the level to trace for the following in the User
Application logging.

com.novell.srvprv.impl.vdata.model

0
John
3/26/2009 11:25:58 AM
Yes I do get errors in the server log.

This Is piece of the server log that I think could be relevant, it sure
does not look right to me:2009-03-26 14:10:14,739 DEBUG
[com.novell.soa.af.impl.core.DataItemEvaluator:evaluateTarget] result:
com.novell.soa.script.mozilla.javascript.Undefined@1ce667c
2009-03-26 14:10:14,739 DEBUG
[com.novell.soa.af.impl.core.DataItemEvaluator:evaluateTarget]
evaluating target expression:
wi.createXPath("flow-data/start/request_form/enddate").setValue("20090331140000000+0200")
2009-03-26 14:10:14,739 DEBUG
[com.novell.soa.af.impl.core.DataItemEvaluator:evaluateTarget] result:
com.novell.soa.script.mozilla.javascript.Undefined@1ce667c
2009-03-26 14:10:14,849 DEBUG
[com.novell.soa.af.impl.core.DataItemEvaluator:evaluateSource]
evaluating source expression: function setDateTime1(){
/*
convert date from entry on workflow to eDir format
date or datepicker is used to pick date
*/
var edirFormat=new java.text.SimpleDateFormat("yyyyMMddhhmmssZ");
var workflowFormat=new
java.text.SimpleDateFormat("yyyyMMddhhmmssSSSZ");
try {
var tempDate =
workflowFormat.parse(flowdata.get('start/request_form/enddate'));
} catch (err) {
return err
}
return edirFormat.format(tempDate);

};
setDateTime1;
2009-03-26 14:10:14,849 DEBUG
[com.novell.soa.af.impl.core.DataItemEvaluator:evaluateSource] result:
com.novell.soa.script.mozilla.javascript.gen.c391@66e0e2
2009-03-26 14:10:14,849 DEBUG
[com.novell.soa.af.impl.core.DataItemEvaluator:evaluateSource]
evaluating source expression: function setDateTime2(){
/*
convert date from entry on workflow to eDir format
date or datepicker is used to pick date
*/
var edirFormat=new java.text.SimpleDateFormat("yyyyMMddhhmmssZ");
var workflowFormat=new
java.text.SimpleDateFormat("yyyyMMddhhmmssSSSZ");
try {
var tempDate =
workflowFormat.parse(flowdata.get('start/request_form/startdate'));
} catch (err) {
return err
}
return edirFormat.format(tempDate);

};
setDateTime2;
2009-03-26 14:10:14,864 DEBUG
[com.novell.soa.af.impl.core.DataItemEvaluator:evaluateSource] result:
com.novell.soa.script.mozilla.javascript.gen.c392@198219b


And then I get the Error at the end of the server log:

2009-03-26 14:10:15,051 ERROR
[com.novell.soa.af.impl.LogEvent:logError] [Workflow_Error] Initiated by
cn=joagan,ou=Users,ou=Active,o=Corp, Error Message: Ldap error creating
object: cn=0konsult29,ou=newusers,ou=Inactive,O=Corp. Error:
javax.naming.directory.InvalidAttributeValueException: [LDAP: error code
19 - NDS error: syntax violation (-613)]; remaining name
'cn=0konsult29,ou=newusers,ou=Inactive,O=Corp', Process ID:
5520f21a30b142fab84c1db987611d7d, Process Name: cn=create consul
test,cn=RequestDefs,cn=AppConfig,cn=UserApplication
Office,cn=IDV-DriverSet,ou=res,o=Corp, Activity: Activity, Recipient:
cn=joagan,ou=Users,ou=Active,o=Corp
2009-03-26 14:10:15,051 TRACE
[com.novell.soa.af.impl.LogEvent:logError] Ldap error creating object:
cn=0konsult29,ou=newusers,ou=Inactive,O=Corp. Error:
javax.naming.directory.InvalidAttributeValueException: [LDAP: error code
19 - NDS error: syntax violation (-613)]; remaining name
'cn=0konsult29,ou=newusers,ou=Inactive,O=Corp'
com.novell.srvprv.spi.vdata.exception.VirtualDataException: Ldap error
creating object: cn=0konsult29,ou=newusers,ou=Inactive,O=Corp. Error:
javax.naming.directory.InvalidAttributeValueException: [LDAP: error code
19 - NDS error: syntax violation (-613)]; remaining name
'cn=0konsult29,ou=newusers,ou=Inactive,O=Corp'
at
com.novell.srvprv.impl.vdata.model.VirtualDataAccess.createEntity(VirtualDataAccess.java:291)
at
com.novell.srvprv.impl.vdata.model.VirtualDataModel.createEntity(VirtualDataModel.java:574)
at
com.novell.soa.af.impl.prvsrv.ProvisionRequest.doAddProvisionRequest(ProvisionRequest.java:441)
at
com.novell.soa.af.impl.prvsrv.ProvisionRequest.doRequest(ProvisionRequest.java:333)
at
com.novell.soa.af.impl.activity.ProvisionActivity.process(ProvisionActivity.java:267)
at
com.novell.soa.af.impl.activity.ActivityNode.notifyArrive(ActivityNode.java:181)
at
com.novell.soa.af.impl.core.ProcessImpl.startActivity(ProcessImpl.java:1630)
at
com.novell.soa.af.impl.core.ProcessImpl.forward(ProcessImpl.java:1516)
at
com.novell.soa.af.impl.activity.ActivityNode.forward(ActivityNode.java:240)
at
com.novell.soa.af.impl.activity.ActivityNode.forward(ActivityNode.java:215)
at
com.novell.soa.af.impl.activity.MappingActivity.process(MappingActivity.java:67)
at
com.novell.soa.af.impl.activity.ActivityNode.notifyArrive(ActivityNode.java:181)
at
com.novell.soa.af.impl.core.ProcessImpl.startActivity(ProcessImpl.java:1630)
at
com.novell.soa.af.impl.core.ProcessImpl.forward(ProcessImpl.java:1516)
at
com.novell.soa.af.impl.activity.ActivityNode.forward(ActivityNode.java:240)
at
com.novell.soa.af.impl.activity.ActivityNode.forward(ActivityNode.java:215)
at
com.novell.soa.af.impl.activity.StartActivity.process(StartActivity.java:74)
at
com.novell.soa.af.impl.activity.ActivityNode.notifyArrive(ActivityNode.java:181)
at
com.novell.soa.af.impl.activity.RunnableActivity.run(RunnableActivity.java:50)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.naming.directory.InvalidAttributeValueException:
[LDAP: error code 19 - NDS error: syntax violation (-613)]; remaining
name 'cn=0konsult29,ou=newusers,ou=Inactive,O=Corp'
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:2998)
at
com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2931)
at
com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2737)
at
com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:770)
at
com.sun.jndi.toolkit.ctx.ComponentDirContext.p_createSubcontext(ComponentDirContext.java:319)
at
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(PartialCompositeDirContext.java:248)
at
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(PartialCompositeDirContext.java:236)
at sun.reflect.GeneratedMethodAccessor1255.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.sssw.fw.directory.realm.impl.jndildap.EboLdapContextProxyHandler.invokeMethod(EboLdapContextProxyHandler.java:150)
at
com.sssw.fw.directory.realm.impl.jndildap.EboLdapContextProxyHandler.invoke(EboLdapContextProxyHandler.java:91)
at $Proxy58.createSubcontext(Unknown Source)
at
com.novell.srvprv.impl.vdata.model.VirtualDataAccess.createEntity(VirtualDataAccess.java:272)
... 21 more
2009-03-26 14:10:15,051 TRACE
[com.novell.soa.af.impl.core.ProcessImpl:isActive] Process
5520f21a30b142fab84c1db987611d7d isActive() = false


-- 
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: http://forums.novell.com/member.php?userid=6236
View this thread: http://forums.novell.com/showthread.php?t=364179

0
joakim
3/26/2009 3:16:02 PM
Where are you placing this code? In the source expression of a entity
activity? In the source of a Mapping activity?

On 03/26/2009 09:16 AM, joakim ganse wrote:

> Yes I do get errors in the server log.
> 
> This Is piece of the server log that I think could be relevant, it sure
> does not look right to me:2009-03-26 14:10:14,739 DEBUG
> [com.novell.soa.af.impl.core.DataItemEvaluator:evaluateTarget] result:
> com.novell.soa.script.mozilla.javascript.Undefined@1ce667c
> 2009-03-26 14:10:14,739 DEBUG
> [com.novell.soa.af.impl.core.DataItemEvaluator:evaluateTarget]
> evaluating target expression:
> wi.createXPath("flow-data/start/request_form/enddate").setValue("20090331140000000+0200")
> 2009-03-26 14:10:14,739 DEBUG
> [com.novell.soa.af.impl.core.DataItemEvaluator:evaluateTarget] result:
> com.novell.soa.script.mozilla.javascript.Undefined@1ce667c
> 2009-03-26 14:10:14,849 DEBUG
> [com.novell.soa.af.impl.core.DataItemEvaluator:evaluateSource]
> evaluating source expression: function setDateTime1(){
> /*
> convert date from entry on workflow to eDir format
> date or datepicker is used to pick date
> */
> var edirFormat=new java.text.SimpleDateFormat("yyyyMMddhhmmssZ");
> var workflowFormat=new
> java.text.SimpleDateFormat("yyyyMMddhhmmssSSSZ");
> try {
> var tempDate =
> workflowFormat.parse(flowdata.get('start/request_form/enddate'));
> } catch (err) {
> return err
> }
> return edirFormat.format(tempDate);
> 
> };
> setDateTime1;
> 2009-03-26 14:10:14,849 DEBUG
> [com.novell.soa.af.impl.core.DataItemEvaluator:evaluateSource] result:
> com.novell.soa.script.mozilla.javascript.gen.c391@66e0e2
> 2009-03-26 14:10:14,849 DEBUG
> [com.novell.soa.af.impl.core.DataItemEvaluator:evaluateSource]
> evaluating source expression: function setDateTime2(){
> /*
> convert date from entry on workflow to eDir format
> date or datepicker is used to pick date
> */
> var edirFormat=new java.text.SimpleDateFormat("yyyyMMddhhmmssZ");
> var workflowFormat=new
> java.text.SimpleDateFormat("yyyyMMddhhmmssSSSZ");
> try {
> var tempDate =
> workflowFormat.parse(flowdata.get('start/request_form/startdate'));
> } catch (err) {
> return err
> }
> return edirFormat.format(tempDate);
> 
> };
> setDateTime2;
> 2009-03-26 14:10:14,864 DEBUG
> [com.novell.soa.af.impl.core.DataItemEvaluator:evaluateSource] result:
> com.novell.soa.script.mozilla.javascript.gen.c392@198219b
> 
> 
> And then I get the Error at the end of the server log:
> 
> 2009-03-26 14:10:15,051 ERROR
> [com.novell.soa.af.impl.LogEvent:logError] [Workflow_Error] Initiated by
> cn=joagan,ou=Users,ou=Active,o=Corp, Error Message: Ldap error creating
> object: cn=0konsult29,ou=newusers,ou=Inactive,O=Corp. Error:
> javax.naming.directory.InvalidAttributeValueException: [LDAP: error code
> 19 - NDS error: syntax violation (-613)]; remaining name
> 'cn=0konsult29,ou=newusers,ou=Inactive,O=Corp', Process ID:
> 5520f21a30b142fab84c1db987611d7d, Process Name: cn=create consul
> test,cn=RequestDefs,cn=AppConfig,cn=UserApplication
> Office,cn=IDV-DriverSet,ou=res,o=Corp, Activity: Activity, Recipient:
> cn=joagan,ou=Users,ou=Active,o=Corp
> 2009-03-26 14:10:15,051 TRACE
> [com.novell.soa.af.impl.LogEvent:logError] Ldap error creating object:
> cn=0konsult29,ou=newusers,ou=Inactive,O=Corp. Error:
> javax.naming.directory.InvalidAttributeValueException: [LDAP: error code
> 19 - NDS error: syntax violation (-613)]; remaining name
> 'cn=0konsult29,ou=newusers,ou=Inactive,O=Corp'
> com.novell.srvprv.spi.vdata.exception.VirtualDataException: Ldap error
> creating object: cn=0konsult29,ou=newusers,ou=Inactive,O=Corp. Error:
> javax.naming.directory.InvalidAttributeValueException: [LDAP: error code
> 19 - NDS error: syntax violation (-613)]; remaining name
> 'cn=0konsult29,ou=newusers,ou=Inactive,O=Corp'
> at
> com.novell.srvprv.impl.vdata.model.VirtualDataAccess.createEntity(VirtualDataAccess.java:291)
> at
> com.novell.srvprv.impl.vdata.model.VirtualDataModel.createEntity(VirtualDataModel.java:574)
> at
> com.novell.soa.af.impl.prvsrv.ProvisionRequest.doAddProvisionRequest(ProvisionRequest.java:441)
> at
> com.novell.soa.af.impl.prvsrv.ProvisionRequest.doRequest(ProvisionRequest.java:333)
> at
> com.novell.soa.af.impl.activity.ProvisionActivity.process(ProvisionActivity.java:267)
> at
> com.novell.soa.af.impl.activity.ActivityNode.notifyArrive(ActivityNode.java:181)
> at
> com.novell.soa.af.impl.core.ProcessImpl.startActivity(ProcessImpl.java:1630)
> at
> com.novell.soa.af.impl.core.ProcessImpl.forward(ProcessImpl.java:1516)
> at
> com.novell.soa.af.impl.activity.ActivityNode.forward(ActivityNode.java:240)
> at
> com.novell.soa.af.impl.activity.ActivityNode.forward(ActivityNode.java:215)
> at
> com.novell.soa.af.impl.activity.MappingActivity.process(MappingActivity.java:67)
> at
> com.novell.soa.af.impl.activity.ActivityNode.notifyArrive(ActivityNode.java:181)
> at
> com.novell.soa.af.impl.core.ProcessImpl.startActivity(ProcessImpl.java:1630)
> at
> com.novell.soa.af.impl.core.ProcessImpl.forward(ProcessImpl.java:1516)
> at
> com.novell.soa.af.impl.activity.ActivityNode.forward(ActivityNode.java:240)
> at
> com.novell.soa.af.impl.activity.ActivityNode.forward(ActivityNode.java:215)
> at
> com.novell.soa.af.impl.activity.StartActivity.process(StartActivity.java:74)
> at
> com.novell.soa.af.impl.activity.ActivityNode.notifyArrive(ActivityNode.java:181)
> at
> com.novell.soa.af.impl.activity.RunnableActivity.run(RunnableActivity.java:50)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.naming.directory.InvalidAttributeValueException:
> [LDAP: error code 19 - NDS error: syntax violation (-613)]; remaining
> name 'cn=0konsult29,ou=newusers,ou=Inactive,O=Corp'
> at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:2998)
> at
> com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2931)
> at
> com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2737)
> at
> com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:770)
> at
> com.sun.jndi.toolkit.ctx.ComponentDirContext.p_createSubcontext(ComponentDirContext.java:319)
> at
> com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(PartialCompositeDirContext.java:248)
> at
> com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(PartialCompositeDirContext.java:236)
> at sun.reflect.GeneratedMethodAccessor1255.invoke(Unknown
> Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> com.sssw.fw.directory.realm.impl.jndildap.EboLdapContextProxyHandler.invokeMethod(EboLdapContextProxyHandler.java:150)
> at
> com.sssw.fw.directory.realm.impl.jndildap.EboLdapContextProxyHandler.invoke(EboLdapContextProxyHandler.java:91)
> at $Proxy58.createSubcontext(Unknown Source)
> at
> com.novell.srvprv.impl.vdata.model.VirtualDataAccess.createEntity(VirtualDataAccess.java:272)
> .. 21 more
> 2009-03-26 14:10:15,051 TRACE
> [com.novell.soa.af.impl.core.ProcessImpl:isActive] Process
> 5520f21a30b142fab84c1db987611d7d isActive() = false
> 
> 

0
John
3/26/2009 6:08:57 PM
In the source of a Mapping activity.


-- 
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: http://forums.novell.com/member.php?userid=6236
View this thread: http://forums.novell.com/showthread.php?t=364179

0
joakim
3/27/2009 7:36:02 AM
At the end of your functions you want setDateTime1(); This will call the
function you declared.

On 03/26/2009 10:16 AM, joakim ganse wrote:

> Yes I do get errors in the server log.
> 
> This Is piece of the server log that I think could be relevant, it sure
> does not look right to me:2009-03-26 14:10:14,739 DEBUG
> [com.novell.soa.af.impl.core.DataItemEvaluator:evaluateTarget] result:
> com.novell.soa.script.mozilla.javascript.Undefined@1ce667c
> 2009-03-26 14:10:14,739 DEBUG
> [com.novell.soa.af.impl.core.DataItemEvaluator:evaluateTarget]
> evaluating target expression:
> wi.createXPath("flow-data/start/request_form/enddate").setValue("20090331140000000+0200")
> 2009-03-26 14:10:14,739 DEBUG
> [com.novell.soa.af.impl.core.DataItemEvaluator:evaluateTarget] result:
> com.novell.soa.script.mozilla.javascript.Undefined@1ce667c
> 2009-03-26 14:10:14,849 DEBUG
> [com.novell.soa.af.impl.core.DataItemEvaluator:evaluateSource]
> evaluating source expression: function setDateTime1(){
> /*
> convert date from entry on workflow to eDir format
> date or datepicker is used to pick date
> */
> var edirFormat=new java.text.SimpleDateFormat("yyyyMMddhhmmssZ");
> var workflowFormat=new
> java.text.SimpleDateFormat("yyyyMMddhhmmssSSSZ");
> try {
> var tempDate =
> workflowFormat.parse(flowdata.get('start/request_form/enddate'));
> } catch (err) {
> return err
> }
> return edirFormat.format(tempDate);
> 
> };
> setDateTime1;
> 2009-03-26 14:10:14,849 DEBUG
> [com.novell.soa.af.impl.core.DataItemEvaluator:evaluateSource] result:
> com.novell.soa.script.mozilla.javascript.gen.c391@66e0e2
> 2009-03-26 14:10:14,849 DEBUG
> [com.novell.soa.af.impl.core.DataItemEvaluator:evaluateSource]
> evaluating source expression: function setDateTime2(){
> /*
> convert date from entry on workflow to eDir format
> date or datepicker is used to pick date
> */
> var edirFormat=new java.text.SimpleDateFormat("yyyyMMddhhmmssZ");
> var workflowFormat=new
> java.text.SimpleDateFormat("yyyyMMddhhmmssSSSZ");
> try {
> var tempDate =
> workflowFormat.parse(flowdata.get('start/request_form/startdate'));
> } catch (err) {
> return err
> }
> return edirFormat.format(tempDate);
> 
> };
> setDateTime2;
> 2009-03-26 14:10:14,864 DEBUG
> [com.novell.soa.af.impl.core.DataItemEvaluator:evaluateSource] result:
> com.novell.soa.script.mozilla.javascript.gen.c392@198219b
> 
> 
> And then I get the Error at the end of the server log:
> 
> 2009-03-26 14:10:15,051 ERROR
> [com.novell.soa.af.impl.LogEvent:logError] [Workflow_Error] Initiated by
> cn=joagan,ou=Users,ou=Active,o=Corp, Error Message: Ldap error creating
> object: cn=0konsult29,ou=newusers,ou=Inactive,O=Corp. Error:
> javax.naming.directory.InvalidAttributeValueException: [LDAP: error code
> 19 - NDS error: syntax violation (-613)]; remaining name
> 'cn=0konsult29,ou=newusers,ou=Inactive,O=Corp', Process ID:
> 5520f21a30b142fab84c1db987611d7d, Process Name: cn=create consul
> test,cn=RequestDefs,cn=AppConfig,cn=UserApplication
> Office,cn=IDV-DriverSet,ou=res,o=Corp, Activity: Activity, Recipient:
> cn=joagan,ou=Users,ou=Active,o=Corp
> 2009-03-26 14:10:15,051 TRACE
> [com.novell.soa.af.impl.LogEvent:logError] Ldap error creating object:
> cn=0konsult29,ou=newusers,ou=Inactive,O=Corp. Error:
> javax.naming.directory.InvalidAttributeValueException: [LDAP: error code
> 19 - NDS error: syntax violation (-613)]; remaining name
> 'cn=0konsult29,ou=newusers,ou=Inactive,O=Corp'
> com.novell.srvprv.spi.vdata.exception.VirtualDataException: Ldap error
> creating object: cn=0konsult29,ou=newusers,ou=Inactive,O=Corp. Error:
> javax.naming.directory.InvalidAttributeValueException: [LDAP: error code
> 19 - NDS error: syntax violation (-613)]; remaining name
> 'cn=0konsult29,ou=newusers,ou=Inactive,O=Corp'
> at
> com.novell.srvprv.impl.vdata.model.VirtualDataAccess.createEntity(VirtualDataAccess.java:291)
> at
> com.novell.srvprv.impl.vdata.model.VirtualDataModel.createEntity(VirtualDataModel.java:574)
> at
> com.novell.soa.af.impl.prvsrv.ProvisionRequest.doAddProvisionRequest(ProvisionRequest.java:441)
> at
> com.novell.soa.af.impl.prvsrv.ProvisionRequest.doRequest(ProvisionRequest.java:333)
> at
> com.novell.soa.af.impl.activity.ProvisionActivity.process(ProvisionActivity.java:267)
> at
> com.novell.soa.af.impl.activity.ActivityNode.notifyArrive(ActivityNode.java:181)
> at
> com.novell.soa.af.impl.core.ProcessImpl.startActivity(ProcessImpl.java:1630)
> at
> com.novell.soa.af.impl.core.ProcessImpl.forward(ProcessImpl.java:1516)
> at
> com.novell.soa.af.impl.activity.ActivityNode.forward(ActivityNode.java:240)
> at
> com.novell.soa.af.impl.activity.ActivityNode.forward(ActivityNode.java:215)
> at
> com.novell.soa.af.impl.activity.MappingActivity.process(MappingActivity.java:67)
> at
> com.novell.soa.af.impl.activity.ActivityNode.notifyArrive(ActivityNode.java:181)
> at
> com.novell.soa.af.impl.core.ProcessImpl.startActivity(ProcessImpl.java:1630)
> at
> com.novell.soa.af.impl.core.ProcessImpl.forward(ProcessImpl.java:1516)
> at
> com.novell.soa.af.impl.activity.ActivityNode.forward(ActivityNode.java:240)
> at
> com.novell.soa.af.impl.activity.ActivityNode.forward(ActivityNode.java:215)
> at
> com.novell.soa.af.impl.activity.StartActivity.process(StartActivity.java:74)
> at
> com.novell.soa.af.impl.activity.ActivityNode.notifyArrive(ActivityNode.java:181)
> at
> com.novell.soa.af.impl.activity.RunnableActivity.run(RunnableActivity.java:50)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.naming.directory.InvalidAttributeValueException:
> [LDAP: error code 19 - NDS error: syntax violation (-613)]; remaining
> name 'cn=0konsult29,ou=newusers,ou=Inactive,O=Corp'
> at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:2998)
> at
> com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2931)
> at
> com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2737)
> at
> com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:770)
> at
> com.sun.jndi.toolkit.ctx.ComponentDirContext.p_createSubcontext(ComponentDirContext.java:319)
> at
> com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(PartialCompositeDirContext.java:248)
> at
> com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(PartialCompositeDirContext.java:236)
> at sun.reflect.GeneratedMethodAccessor1255.invoke(Unknown
> Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> com.sssw.fw.directory.realm.impl.jndildap.EboLdapContextProxyHandler.invokeMethod(EboLdapContextProxyHandler.java:150)
> at
> com.sssw.fw.directory.realm.impl.jndildap.EboLdapContextProxyHandler.invoke(EboLdapContextProxyHandler.java:91)
> at $Proxy58.createSubcontext(Unknown Source)
> at
> com.novell.srvprv.impl.vdata.model.VirtualDataAccess.createEntity(VirtualDataAccess.java:272)
> .. 21 more
> 2009-03-26 14:10:15,051 TRACE
> [com.novell.soa.af.impl.core.ProcessImpl:isActive] Process
> 5520f21a30b142fab84c1db987611d7d isActive() = false
> 
> 

0
John
3/30/2009 3:52:49 PM
Thanks !

But of cause it had to be something like that.
I know I had the right code at some point at the beginning since I did
copy and paste it, I newer trust my spelling :-)

Now it works anyway.


-- 
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: http://forums.novell.com/member.php?userid=6236
View this thread: http://forums.novell.com/showthread.php?t=364179

0
joakim
3/31/2009 7:46:02 AM
On 03/31/2009 02:46 AM, joakim ganse wrote:

> Thanks !
> 
> But of cause it had to be something like that.
> I know I had the right code at some point at the beginning since I did
> copy and paste it, I newer trust my spelling :-)
> 
> Now it works anyway.
> 
> 


Glad to hear you got it working. I am with you on typing, because the
smallest typo can leave you perplexed trying to figure out why it does
not work. Of course you never see it until someone else points it out :(
0
John
3/31/2009 12:16:21 PM
I thought I was done with this!

Now I do get the time over and that is great.
I do get another problem.
If I don't provide a time ( the field is not required ) the user does
not get created.
This is probably because the convert date function is trying to covert
nothing to something and does set the date to that something witch will
be wrong.

I get this error in the log right after the function:

2009-03-31 14:35:25,757 DEBUG
[com.novell.soa.af.impl.core.DataItemEvaluator:evaluateSource] result:
JavaException: java.text.ParseException: Unparseable date: ""


-- 
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: http://forums.novell.com/member.php?userid=6236
View this thread: http://forums.novell.com/showthread.php?t=364179

0
joakim
3/31/2009 12:56:02 PM
On 03/31/2009 07:56 AM, joakim ganse wrote:

> I thought I was done with this!
> 
> Now I do get the time over and that is great.
> I do get another problem.
> If I don't provide a time ( the field is not required ) the user does
> not get created.
> This is probably because the convert date function is trying to covert
> nothing to something and does set the date to that something witch will
> be wrong.
> 


Good bet.

> I get this error in the log right after the function:
> 
> 2009-03-31 14:35:25,757 DEBUG
> [com.novell.soa.af.impl.core.DataItemEvaluator:evaluateSource] result:
> JavaException: java.text.ParseException: Unparseable date: ""
> 
> 



How about detecting if no date is set in your script and setting some
some time in the future?

Or do the check before in a condition and one path goes to the entity
activity with date and the other doesn't.
0
John
3/31/2009 7:10:35 PM
Thanks for all your help.
I ended up with a condition before two different mappings.


-- 
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: http://forums.novell.com/member.php?userid=6236
View this thread: http://forums.novell.com/showthread.php?t=364179

0
joakim
4/2/2009 8:16:02 AM
Reply:

Similar Artilces:

calendar date span (date start : date end)
Hi! Can anyone help me with this? Say, I have these two textboxes. Date Start:        Date End:             What I wanted to do is to put dates on it using the calendar. My problem is I do not know what to do to keep the "Date Start" not way after the set "Date End", and for "Date End" not way before the set "Date Start".   example: Date Start: July 1, 2008              &nb...

Dates, Dates, Dates!
Hello all... I am in the process of building an appointment system, and I am trying to see if I can get some pointers on which way to go on this. The first version of this appointment system was very lo-tech, and it stored all of the possible dates/times in the database. Once a user booked an appointment, their information was logged to that date/time, and then that date/time would no longer show in the list of possible openings. This was great for a temporary fix, but with having to pre-populate all of the dates/times, the system would eventually have to be updated to continue on pa...

SQL Stored Procedure
Hi hopefully someone can help. I created the following function to return all dates between a start date and end date:  ALTER FUNCTION fnGetDatesInRange ( @FromDate datetime, @ToDate datetime ) RETURNS @DateList TABLE (Dt datetime) AS BEGIN DECLARE @TotalDays int DECLARE @DaysCount int SET @TotalDays = DATEDIFF(dd,@FromDate,@ToDate) SET @DaysCount = 0 WHILE @TotalDays >= @DaysCount BEGIN INSERT INTO @DateList SELECT (@ToDate - @DaysCount) AS DAT SET @DaysCount = @DaysCount + 1 ...

End date before start date bug
I am trying to enter an event lasting from 20 to 26 October 2004, but Calendar won't let me do it, saying the end date is before the start date. I can enter October 25 or 27 October without problem. Is this a known bug? -- Herbert Eppel www.HETranslation.co.uk Herbert Eppel wrote: > I am trying to enter an event lasting from 20 to 26 October 2004, but > Calendar won't let me do it, saying the end date is before the start date. > > I can enter October 25 or 27 October without problem. > > Is this a known bug? > Herbert et al, works...

How to handle a start date and end date.. in a database..
hi,         I am getting a data in a dbf file and they have a StartDate and end Date for where the Statments are valid for.. How can i incorporate them into the database.. right now We are doing with PeriodId.. like while the user imports the data they select which period they want to import the data into.. But now if i have to get those details from the Database how do i store it in the Database..and i need to store them in multiple tables.. Thanks Karen I don't understand your request... could you include a row or two of your data? Are you sayin...

javascript validation for start date and end date
Hey Guys! I have two textbox, one for displaying start date and another for end date. These dates are displayed in the respective textboxes when I clicked in the calendar control's date. So, when i select the  date from first calendar, first textbox is filled with the selected date i.e. the start date and similary the second date is displayed in the second textbox after selecting in the second calendar. So, now how can i validate start date and end date?.  Let say I have selected start date from calendar  as (10/8/2007) and it will fill up the first textbox...

How to build a range of dates from a start and end date.
Hi, I have a start and end date in the format of "m/dd/yyyy" I've figured out how to get the amount of days inbetween using the DateDiff() function. My problem is how would I go about building those start and end dates + the dates in between. I need to build them in a format like this "firstDate,secondDate,thirddate" etc. etc. A comma delimited list. Any help would be greatly appreciated. Cheers! Rob C can you give an xample.. ::I need to build them in a format like this "firstDate,secondDate,thirddate" etc. etc. if your firstdate...

From Date and To Date
 In my application i have two textboxes.One for From date and the other one for To date.I need to check whether the From date is lesser than To Date..Date formats will be either(DD-MM-YYYY) or (DD/MM/YYYY).and i have used calendar extender for selecting dateI need the script code to do this...Thanks in advance See this thread: http://forums.asp.net/t/1346328.aspxMohsin Naeem"Please mark as answer if it helped you"  <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </...

from date to date
I am working on a form for livestock. one of the things in the form is a checkbox to let me know if they qualify or not. the second is I have a created record field entered into the database... now my question is I am doing a search on this and cant figure it out since i am new to all this...i have a query that selects the qualification checkbox (where qualify = 'true') then another query that selects the created record date... and the search is that I want to get the information in the livestock that are qualifyed (have the checkbox qualify = to 'true') between  one dat...

How to get week start date, End date for a given week nunber,year?
I want  a javascript function to to get the starting date and end date of a week when I have given the week number (1 to 5), Month number (1 to 12), valid year as parameter. How to do that?Manivannan  You can visited http://www.datejs.com/2007/11/I dont have example.Hope it's help you. try this example function GetWeekStartEndDate(){    var week = 5;    var month = 4;    var year = 2008;        var PositiveOneDay = new Date(new Date('1/2/2000') - new Date('1/1/2000'));   &...

Daterange Picker Calendar control Without clicking Start Date and End Date Separately ( dd/mm/yyyy-dd/mm/yyyy format
Hello all,  Plz Suggest me the Daterange Picker Calendar control . so that i can select a range of date (after clicking on button javascipt calendar will be executed) and date will appear in the format dd/mm/yyyy-dd/mm/yyyy in listbox (like without cliking for Start Date and End Date Separately)  Swati Jain   Check this:http://www.codeproject.com/useritems/DateRangePicker.asp NC... Some of the third party Calendar controls allow multiple selections. If they support the ability to just click on the start and then end dates to form a range, or can limit the u...

convert date christian date to persian date
hi, I need to convert christain date that was produced in my Sql database to persian date like" دوشنبه 21 مرداد 1378" in a datalist.Could you recommend me any function.I use VisualStudio 2005 & VB. thanks in advance Sepid Take a read of http://www.codeproject.com/KB/database/PersianDateInSQLServer.aspx or maybe a javascript route like http://www.codeproject.com/KB/gadgets/PersianDateViewerGadge.aspx Hope it helpsRegardsJeremyIf this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.That way future readers will ...

Date Validation for six months from start date
Hi All, i am using 2 text box with ajax calender extender as follows <asp:TextBox id="AdvertStartDateTextBox" runat="server" CssClass="text" /> <ajaxToolkit:CalendarExtender ID="AFCalendarExtender" runat="server" Format="dd/MM/yyyy" TargetControlID="AdvertStartDateTextBox" PopupButtonID="AdvertStartDateButton" /> <asp:TextBox id="AdvertEndDateTextBox" runat="server" CssClass="text" /> <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="...

Reminders firing on start date, not due date
I've created several new tasks, all with the current date and time as the start date. (no option to untick the start date box - it is greyed out) I've set a due date for each task. Lightning proceeds to issue a reminder alarm immediately after creating each event, and then again repeatedly at seemingly random intervals even though the due dates are far in the future and the alarms are set only a short time prior to each event. Two previous events I created seemed to work appropriately. Any idea how to set the reminder to the due date instead? Using Lightning 1.9....

Web resources about - Start date and End Date - novell.id-manager.userapp

Start - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

New Visa ad campaign for Apple Pay starts today in the UK with ‘anticipation’ theme
... iOS Devices , Apple pay , and Apple Pay continue reading at 9to5Mac . What do you think? Discuss "New Visa ad campaign for Apple Pay starts ...

John Waters working on two new books, starts his annual Christmas show tour this weekend
John Waters may not have made a film since 2004's A Dirty Shame but he has not retired. He's got two books in the works: a collection of essays, ...

Start-ups raising money, staying private
Forget the eye-popping valuations: The sentiment in Silicon Valley is now "show me the liquidity."

Half of all enterprises to start Windows 10 rollouts in the next year
Half of all enterprises will have at least started their rollouts of Windows 10 by January 2017, according to a Gartner report released Monday, ...

Ed Schultz Starts Super PAC
Fancy UPS store headquarters

The Marines start training Google's 160-pound robo-dog Spot
Spot, the silent robo-dog made by Google-owned company Boston Dynamics, enjoyed the great outdoors for a week back in September. Not to fetch ...

Sales Start for Microsoft Lumia 950 Windows 10 Smartphone
Microsoft's flagship Lumia 950 Windows 10 phone goes on sale; Microsoft previews Hyper-V containers for Windows Server 2016; Cray brings Docker ...

Genius of Sir Garfield Sobers explained: Start putting in hard work early and never stop
Sir Garfield Sobers, legendary West Indian all-rounder, has a simple formula for achieving sporting excellence: start putting in the hard work ...

Did Conservatives Start Creative Writing Programs to Fight the Cold War?
In 1946, there were only two programs in creative writing at American universities—one at Iowa and another at Stanford. In 1967, when the Associated ...

Resources last updated: 11/23/2015 10:47:52 PM