Workflow Problem on DWFJobInitiate

Hello,

My problem is following :

I want to insert a document in a workflow.

If I launch my scrip agent myself => no problem

If I schedule the agent (so launched by the server) => big problem on DWFJobInitiate

My code is :

cs_NOM_PROCESS : “CSMF - GRP - ARIM”

ls_Nom_Travail : name of my job to insert in a workflow

cs_PRIORITE_MOYENNE : “2. Moyenne” (in french)

lo_CurDoc : document created before get in a view (before in script) to insert in a workflow

ls_ErrorMsg : return value

ln_Errorcode : return value

lb_Success = DWFJobInitiate(cs_NOM_PROCESS, ls_Nom_Travail, cs_PRIORITE_MOYENNE, False, lo_CurDoc, “”, ls_ErrorMsg, ln_Errorcode)

In my trace : “DWFJobInitiate - ARIM pour Vanessa Durand - saisie le 24/05/2005 18:21:06 / Message erreur = Erreur interne - Object variable not set / Code erreur1”

If anybody have an idea, YOU’RE WELCOME