instantiate an object and attach it to a workflow? - FICA

Paul.Bakker@osr.treasury.qld.gov.au Paul.Bakker at osr.treasury.qld.gov.au
Sun Jun 18 23:54:48 EDT 2006


Ramki,

That does sound like a better idea - as a programmer I hate putting in
artificial 'WAIT' steps.

But I'm not sure how to do it in this case. Normally you wait for a
terminating event from a specific Business Object - usually the
WI_Object_ID in the task container.

But in this case, the CA_DOC object has not yet been created, so which
CREATE event do we wait for? We won't know the key of the CA_DOC until it
has been created!

I'm also not sure how (if this worked) I could "do away" with the
GenericInstantiate?

thanks for your patience,
Paul



|---------+---------------------------->
|         |           workflow99 at aol.co|
|         |           m                |
|         |           Sent by:         |
|         |           sap-wug-bounces at m|
|         |           it.edu           |
|         |                            |
|         |                            |
|         |           16/06/2006 02:00 |
|         |           Please respond to|
|         |           "SAP Workflow    |
|         |           Users' Group"    |
|         |                            |
|---------+---------------------------->
  >------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                              |
  |       To:       sap-wug at mit.edu                                                                                              |
  |       cc:                                                                                                                    |
  |       Subject:  Re: instantiate an object and attach it to a workflow? - FICA                                                |
  >------------------------------------------------------------------------------------------------------------------------------|




Paul,

  A better way would be to make your create task async and have it
terminate on the Created event of CA_DOC. Then you can bind the CA_DOC
object to WF and do away with the generic instantiate. (I do not have
CA_DOC object on our system either. So, I do not know if a Created
event is published for the object or how much effort is needed to
publish it.)

 Best Regards,
 Ramki Maley,
 WF Consultant.


 -----Original Message-----
 From: Paul.Bakker at osr.treasury.qld.gov.au
 To: SAP Workflow Users' Group <sap-wug at mit.edu>
 Sent: Thu, 15 Jun 2006 17:54:20 +1000
 Subject: Re: instantiate an object and attach it to a workflow? - FICA

 Mark,

  Thanks for that. I've solved the problem now, but in a fairly ugly
way.. I
 put a 'Requested Start' of "+1 minute" on the workitem that does the
 instantiation. By the time ithe workitem executes, the CA_DOC has been
 created and the instantation works.

 FYI: the object CA_DOC is specific to Contract Accounting (or PSCD)

 cheers - and thanks,
 Paul B



 |---------+---------------------------->
 | | "Mark Pyc" |
 | | <mark.pyc at gmail.c|
 | | om> |
 | | Sent by: |
 | | sap-wug-bounces at m|
 | | it.edu |
 | | |
 | | |
 | | 15/06/2006 17:42 |
 | | Please respond to|
 | | "SAP Workflow |
 | | Users' Group" |
 | | |
 |---------+---------------------------->

 >------------------------------------------------------------------------
------------------------------------------------------|
 |
 |
 | To: "SAP Workflow Users' Group" <sap-wug at mit.edu>
 |
 | cc:
 |
 | Subject: Re: instantiate an object and attach it to a workflow? -
 FICA |

 >------------------------------------------------------------------------
------------------------------------------------------|




 G'day Paul,

  You're on the right path. I don't seem to have an object type of
CA_DOC in
 my ECC system so I can't comment on specifics.

  Have you tried just testing the SYSTEM method from SWO1?? If you've
got the
  key right you should be get an object link back that you can double
click
 into to confirm that it's worked happily.

 Good luck,
 Mark


 On 6/15/06, Paul.Bakker at osr.treasury.qld.gov.au <
 Paul.Bakker at osr.treasury.qld.gov.au> wrote:
 Workflow Gurus,

  I have a custom workflow which, after seeking agent approval, creates
an
 object (a document of type CA_DOC).

  I would like to attach an instance of the created object to the
workflow,
 so that 'object services' can be used later.

 To do this, I added a custom step which calls the method
 SYSTEM.GENERICINSTANTIATE . Apparently if you pass the object key (and
 object type) to this method, it instantiates the object. This is then
 passed back to the workflow container.

  At least, that's what I hoped it would do! In practice the workflow
goes
  into error with message OL808: "Object with runtime number '0' not
defined"

  When I try to view the new CA_DOC object (via FPE3), it does not
exist. I
 suspect this is because the workflow went into error... it didn't get a
 chance to save the document.

  And yet, if I run the workflow without the extra GENERECINSTANTIATE
step,
 it works fine.

  Does anyone have any idea what the problem is? Could it be that a
'COMMIT
 WORK' needs to be done before trying to instantiate the new object? Is
 there a workflow step for doing that?

  Or am I just being stupid. Is there a much easier way to attach an
object
 to a workflow via a background step?

 merci
 Paul Bakker
 Brisbane



*************************************************************************
*************************************************************************
****


 Only an individual or entity who is intended to be a recipient of this
  e-mail may access or use the information contained in this e-mail or
any of
 its attachments. Opinions contained in this e-mail or any of its
  attachments do not necessarily reflect the opinions of Queensland
Treasury.

  The contents of this e-mail and any attachments are confidential and
may be
  legally privileged and the subject of copyright. If you have received
this
  e-mail in error, please notify Queensland Treasury immediately and
erase
 all copies of the e-mail and the attachments. Queensland Treasury uses
  virus scanning software. However, it is not liable for viruses present
in
 this e-mail or in any attachment.


*************************************************************************
*************************************************************************
****


 _______________________________________________
 SAP-WUG mailing list
 SAP-WUG at mit.edu
 http://mailman.mit.edu/mailman/listinfo/sap-wug
 _______________________________________________
 SAP-WUG mailing list
 SAP-WUG at mit.edu
 http://mailman.mit.edu/mailman/listinfo/sap-wug



 _______________________________________________
 SAP-WUG mailing list
 SAP-WUG at mit.edu
 http://mailman.mit.edu/mailman/listinfo/sap-wug


________________________________________________________________________
Check out AOL.com today. Breaking news, video search, pictures, email
and IM. All on demand. Always Free.

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug






More information about the SAP-WUG mailing list