Initaiting a Process Instance through e-mail
Hi,
I have a query on ALBPM(6.0.2) Studio.
Can I initiate a process on receiving a mail to the mailbox.(SMTP Configured Inbox)
like the way we send reminder mails to the SMTP configured mail box, Is it possible to initaiate a process automatically when that configured mail box receives a particular mail??
Can anyone please guide me in this as early as possible.
Regards
kavitha...
Hi,
This forum is Oracle BPEL specific for the most part. Have you also tried posting in the aqualogic bpm forum Business Process Management Suite Maybe a good opertunity to switch to Oracle BPEL which is going to happen anyway in the near future ;)
Kind Regards,
Andre Jochems
Similar Messages
-
Initiating a Process Instance by E-mail
Does anyone have an example of xml file that I should send to workflow server to initiate a process instance by e-mail?
Tks a lot.
Marcelo.Marcelo,
To create a sample data file for email initiation, open the form in test mode and save data file locally - this gives you an excellent and easy starting point, using exact field names you have defined.
Good luck,
SM -
Hi All,
How to get the process instance key so as to retry a rejected task through API while AD provisioing state?
API URL - http://docs.oracle.com/cd/E27559_01/apirefs.1112/e28159/toc.htm
ThanksTo retry a task that is in a rejected state, you use the SCH_KEY which is the task key. In OIM, all rejected tasks are listed in the OTI table. It contains all the important information about a rejected or pending task.
You can use the APIs found in the tcProvisioningOperationsIntf class to retrieve open tasks.
-Kevin -
Hi - I cannot upload my emails through the mail icon. The first time I tried it only loaded very old emails, I then tried the whole process again and it has not imported a single email. I use hotmail, and have had no problems with my iPhone or iPad. So the only way I can check my emails on my mac is to go through the internet. Can anyone help?
Hello, do you mean Download?
In Mail's Window Menu, choose Connection Doctor, any red dots for status, if so what is the message?
Then click the Show Details button & Check again. -
Getting the sub Process instance id through PAPI
Hi Can anyone suggest me how to get the sub process instance id using PAPI?
I was only able to figure this out as follows... If you have an InstanceInfo variable (called "instance"), then:
InstanceEvent[] events = new fuego.papi.InstanceEvent[0];
events = session.getInstanceEvents(instance.getId());
for (InstanceEvent event : events) {
if (event.type == 14) {
System.out.println("child instance ID is: " + event.eventData);
I ended up creating a recursive function that would drill down to get sub-sub-...-sub-instance IDs as necessary.
Todd -
Invoice is not sent through e-mail (RRB)
Hi Good Morning,
This issue is related to RRB Invoice output.
Invoice has been created and saved, mail will be sent to the concern user after the batch job done.
Here the invoice has not been sent to the user through the e-mail.
The error log saysUnable to process output for consolidated invoice; Please use VF23 to process consolidated
Could you please share some information regarding this.
Thanks in Advance
VNRHi Santosh,
Thank you for your prompt response.
We send the invoices to the concern users through e-mails by running background job.
In this particular invoice the error occured " Unable to process output for consolidated invoice; Please use VF23 to process consolidated"as mentioned.
Its not invoice list it is an Invoice.
But not sure why system gives the error.
Appreciate your kind help
Regards,
VNR -
BPM 11.1.1.6 error creating process instance
Hello!
I am deploying BPM processes using JDeveloper 11.1.1.5 and SOA Server 11.1.1.6 and I am getting the following error:
[2012-12-04T19:11:47.209+01:00] [WLS_SOA1] [NOTIFICATION] [] [oracle.integration.platform.blocks.tenant] [tid: [ACTIVE].ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: j.pla] [ecid: 004o0fC^L8nFw000jzwkno0003VU000K3D,0:1] [APP: soa-infra] [URI: /bpm/workspace/faces/jsf/worklist/worklist.jspx] NM or Event does not contain property, apps.context.header or fabric.enterpriseId
[2012-12-04T19:11:47.614+01:00] [WLS_SOA1] [NOTIFICATION] [] [oracle.fabric.common.wsdl] [tid: [ACTIVE].ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: j.pla] [ecid: 004o0fC^L8nFw000jzwkno0003VU000K3D,0:1] [APP: soa-infra] [composite_name: Generico] [component_name: Generico] [component_instance_id: 120045] [URI: /bpm/workspace/faces/jsf/worklist/worklist.jspx] XMLSchema incremental build enabled.
[2012-12-04T19:11:47.681+01:00] [WLS_SOA1] [ERROR] [] [oracle.soa.bpmn.engine.bpmn] [tid: [ACTIVE].ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: j.pla] [ecid: 004o0fC^L8nFw000jzwkno0003VU000K3D,0:1] [APP: soa-infra] [composite_name: Generico] [component_name: Generico] [component_instance_id: 120045] [URI: /bpm/workspace/faces/jsf/worklist/worklist.jspx] BPELFault {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure} current Operation {INSTANCE_SUSPENDED}
[2012-12-04T19:11:47.690+01:00] [WLS_SOA1] [ERROR] [] [oracle.bpm.services.instanceManagement] [tid: [ACTIVE].ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: j.pla] [ecid: 004o0fC^L8nFw000jzwkno0003VU000K3D,0:1] [APP: soa-infra] [URI: /bpm/workspace/faces/jsf/worklist/worklist.jspx] Initiate task could not be created for unknown reason for target process 'default/Generico!1.3*/Generico'. Verify server log for error cause.
[2012-12-04T19:11:47.690+01:00] [WLS_SOA1] [ERROR] [] [oracle.bpm.services.instanceManagement] [tid: [ACTIVE].ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: j.pla] [ecid: 004o0fC^L8nFw000jzwkno0003VU000K3D,0:1] [APP: soa-infra] [URI: /bpm/workspace/faces/jsf/worklist/worklist.jspx] Exception[[
exception.70204.type: error
exception.70204.severity: 2
exception.70204.name: Error creating process instance.
exception.70204.description: Error creating instance for target process default/Generico!1.3*/Generico.
exception.70204.fix: Verify server log to find the problem cause.
[2012-12-04T19:11:47.803+01:00] [WLS_SOA1] [WARNING] [] [oracle.bpm.common] [tid: [ACTIVE].ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: j.pla] [ecid: 004o0fC^L8nFw000jzwkno0003VU000K3D,0:1] [APP: OracleBPMWorkspace] [URI: /bpm/workspace/faces/jsf/worklist/worklist.jspx] Error creating instance for target process default/Generico!1.3*/Generico.[[
oracle.bpm.web.exception.WapiOperationException: Error creating instance for target process default/Generico!1.3*/Generico.
at oracle.bpm.workspace.model.common.ExecutionBean.handleExternalInstanceExecution(ExecutionBean.java:188)
at oracle.bpm.workspace.model.application.ApplicationBean.execute(ApplicationBean.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:187)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)
at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:279)
at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:402)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3738)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3704)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2281)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1491)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: fuego.papi.exception.CannotCreateInstanceException: Cannot create instance in process 'default/Generico!1.3*/Generico'.
at oracle.bpm.papi.ora.helper.ExceptionHelper.wrapException(ExceptionHelper.java:58)
at oracle.bpm.papi.ora.util.ApplicationExecution11G.beginExecution(ApplicationExecution11G.java:56)
at fuego.papi.utils.ApplicationExecution.beginExecution(ApplicationExecution.java:29)
at oracle.bpm.workspace.model.common.ExecutionBean.handleExternalInstanceExecution(ExecutionBean.java:171)
... 99 more
Caused by: BPM-70204
Exception
exception.70204.type: error
exception.70204.severity: 2
exception.70204.name: Error creating process instance.
exception.70204.description: Error creating instance for target process default/Generico!1.3*/Generico.
exception.70204.fix: Verify server log to find the problem cause.
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:205)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at oracle.bpm.services.instancemanagement.ejb.InstanceManagementServiceBean_sqa2w0_IInstanceManagementServiceRemoteImpl_1036_WLStub.createProcessInstanceTask(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
at $Proxy501.createProcessInstanceTask(Unknown Source)
at oracle.bpm.papi.ora.util.ApplicationExecution11G.beginExecution(ApplicationExecution11G.java:50)
... 101 more
Could you please help me? I have search through the forum but I couldn't find anything that solves my problem. As I've read in this post (https://kr.forums.oracle.com/forums/thread.jspa?messageID=10596716), I've tried to set the value of the variable bpel.config.transaction to requiresNew instead of required but it isn't working.
I suppose it has to do with the new version of the server but I can't find anything to solve it :(
Thank you in advance!!! I hope you can help me!
Best regards.Frank,
I tried to follow the example. This is the file: http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_53/labs/restsolution.zip
The other part of the exercise is to develop an ADF Client.
At "Step 5: Create the Model Components" when I create the URL_Get the error appears and don't create the datacontrol.
I check the links and RESTConn and are OK.
I hope this helps.
JP
Edited by: jpvadell.oracle on Jul 2, 2012 11:54 AM -
Sending purchase order through e-mail
Hi,
I need to send purchase order in PDF through e-mail. I know it is possible to automatically have it sent to the vendor, but my requirement is different. PO is created as conversion of PREQ, so I need to send it not to vendor directly, but to the PREQ creator first (for possible corrections etc.) Is this somehow possible? I'm using exit EXIT_SAPMM06E_020 where I'd like to paste call to the function module (in update task), which would send the e-mail.
Thanks in advance.
TomasHi,
Use this program
*& Report YMSL_ORDER_ACCEPTANCE
REPORT YMSL_ORDER_ACCEPTANCE.
*********Variable Declarations *****************************
DATA: GV_FORM_NAME TYPE RS38L_FNAM, " Used to store the function module generated by Smartform
GV_BIN_FILESIZE TYPE I, " Store the file size
GV_POS TYPE I,
GV_LEN TYPE I,
GV_TAB_LINES TYPE I,
gv_desc_lines type i.
********Constants *******************************************
DATA : GC_TEXT(11) TYPE C VALUE 'Form Output',
GC_TST(3) TYPE C VALUE 'TST',
GC_TESTING(20) TYPE C VALUE 'Order Acceptance'.
*********Work Area Declarations *****************************
DATA: GS_DOCDATA TYPE SODOCCHGI1, " Data of an object which can be changed
GS_CTRLOP TYPE SSFCTRLOP, " Smart Forms: Control structure
GS_OUTOPT TYPE SSFCOMPOP, " SAP Smart Forms: Smart Composer (transfer) options
GS_OTFDATA TYPE SSFCRESCL, " Smart Forms: Return value at end of form printing
GS_RECLIST TYPE SOMLRECI1, " SAPoffice: Structure of the API Recipient List
GS_PDF_TAB TYPE TLINE, " Workarea for SAP Script Text Lines
GS_OBJBIN TYPE SOLISTI1, " SAPoffice: Single List with Column Length 255
GS_OBJPACK TYPE SOPCKLSTI1. " SAPoffice: Description of Imported Object Components
DATA : w_doc_chng typE sodocchgi1.
*********Internal tables Declarations *****************************
DATA : I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
DATA: GT_RECLIST TYPE TABLE OF SOMLRECI1, " SAPoffice: Structure of the API Recipient List
GT_PDF_TAB TYPE TABLE OF TLINE, " SAPscript: Text Lines
GT_OTF TYPE TABLE OF ITCOO, " OTF Structure
GT_OBJBIN TYPE TABLE OF SOLISTI1, " SAPoffice: Single List with Column Length 255
GT_OBJPACK TYPE TABLE OF SOPCKLSTI1. " SAPoffice: Description of Imported Object Components
DATA : BEGIN OF IT_ADR6 OCCURS 0,
SMTP_ADDR TYPE ADR6-SMTP_ADDR,
END OF IT_ADR6.
DATA : W_FILE_NAME TYPE STRING,
W_FILE_PATH TYPE STRING,
W_FULL_PATH TYPE STRING.
CLEAR : GV_FORM_NAME,
GS_CTRLOP,
GS_OUTOPT,
GS_OTFDATA,
GV_BIN_FILESIZE,
GV_POS,
GV_LEN,
GV_TAB_LINES.
SELECTION-SCREEN: BEGIN OF SCREEN 1001 AS WINDOW TITLE scr_ttl .
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TXT_B1 NO INTERVALS.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(15) TX_VBELN.
PARAMETER : P_VBELN TYPE VBAK-VBELN .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
*SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TXT_B2 .
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: R_OUT RADIOBUTTON GROUP R1 DEFAULT 'X' USER-COMMAND RAD11 .
SELECTION-SCREEN COMMENT 5(20) TXT_OUT. " roles by t-code
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER R_PDF RADIOBUTTON GROUP R1 .
SELECTION-SCREEN COMMENT 5(20) TXT_PDF.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER R_MAIL RADIOBUTTON GROUP R1 .
SELECTION-SCREEN COMMENT 5(15) TXT_MAIL.
*SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(7) TXT_MAL1.
PARAMETER : P_MAIL TYPE ADR6-SMTP_ADDR MODIF ID M1 .
SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN: END OF SCREEN 1001 .
CALL SELECTION-SCREEN 1001 STARTING AT 20 5 ENDING AT 105 10.
*SET PF-STATUS 'STATUS'.
INITIALIZATION.
TX_VBELN = 'Order'.
TXT_B1 = 'Selection Criteria '.
TXT_B2 = 'Output Criteria '.
scr_ttl = 'Order Acceptance'.
TXT_OUT = 'Print Output'.
TXT_PDF = 'Save To PDF'.
TXT_MAIL = 'Mail the Output'.
TXT_MAL1 = 'E-mail'.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF R_MAIL <> 'X'.
IF SCREEN-GROUP1 = 'M1'.
SCREEN-INVISIBLE = 1.
SCREEN-INPUT = 0. " Disable for input.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MAIL.
PERFORM TABLE_HELP.
START-OF-SELECTION..
IF P_VBELN IS NOT INITIAL.
PERFORM GET_SF.
IF R_PDF = 'X' .
PERFORM CONVERT_OTF.
PERFORM SAVE_DIALOG.
PERFORM DOWNLOAD.
ELSEIF R_MAIL = 'X'.
IF P_MAIL IS NOT INITIAL.
PERFORM CONVERT_OTF.
PERFORM SEND_MAIL.
ELSE.
MESSAGE 'Please Enter Email Address' TYPE 'S'.
CALL TRANSACTION 'YMSL20'.
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
ELSE.
MESSAGE 'Please Enter Order No' TYPE 'S'.
CALL TRANSACTION 'YMSL20'.
LEAVE LIST-PROCESSING.
*ENDIF.
END-OF-SELECTION.
*& Form TABLE_HELP
FORM TABLE_HELP .
IF R_MAIL = 'X'.
SELECT SMTP_ADDR FROM ADR6 INTO TABLE IT_ADR6.
SORT IT_ADR6.
DELETE ADJACENT DUPLICATES FROM IT_ADR6 COMPARING ALL FIELDS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'IT_ADR6-SMTP_ADDR'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'EMAIL'
STEPL = 0
WINDOW_TITLE = 'SELECT MAIL ADDRESS'
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_ADR6
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDFORM. " TABLE_HELP
*& Form GET_SF
FORM GET_SF .
*u2022 Generate Function Module name
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Z_CHK'
IMPORTING
FM_NAME = GV_FORM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*u2022 Assigning values to Form Control Structure and Form Composer
IF R_OUT <> 'X'.
GS_CTRLOP-GETOTF = 'X'.
GS_CTRLOP-NO_DIALOG = 'X'.
GS_OUTOPT-TDNOPREV = 'X'.
ENDIF.
*/1BCDWB/SF00000368
CALL FUNCTION GV_FORM_NAME "'/1BCDWB/SF00000368'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = GS_CTRLOP
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = GS_OUTOPT
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = GS_OTFDATA
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION GV_FORM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = GS_CTRLOP
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = GS_OUTOPT
USER_SETTINGS = 'X'
TEMP_VBELN = P_VBELN
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = GS_OTFDATA
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " GET_SF
*& Form CONVERT_OTF
FORM CONVERT_OTF .
*u2022 Assigning the OTFDATA to OTF Structure table
CLEAR GT_OTF.
GT_OTF[] = GS_OTFDATA-OTFDATA[].
*u2022 Convert the OTF DATA to SAP Script Text lines
CLEAR GT_PDF_TAB.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = GV_BIN_FILESIZE
BIN_FILE =
TABLES
OTF = GT_OTF
LINES = GT_PDF_TAB
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*t_otf[] = t_otf_from_fm-otfdata[].
Function Module CONVERT_OTF is used to convert the OTF format to PDF
*CALL FUNCTION 'CONVERT_OTF'
*EXPORTING
*FORMAT = 'PDF'
*MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
*IMPORTING
*BIN_FILESIZE = W_bin_filesize
BIN_FILE =
*TABLES
*otf = T_OTF
*lines = T_pdf_tab
*EXCEPTIONS
*ERR_MAX_LINEWIDTH = 1
*ERR_FORMAT = 2
*ERR_CONV_NOT_POSSIBLE = 3
*ERR_BAD_OTF = 4
*OTHERS = 5
*IF sy-subrc <> 0.
*MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
ENDFORM. " CONVERT_OTF
*& Form SAVE_DIALOG
FORM SAVE_DIALOG .
To display File SAVE dialog window
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE = 'Download to PDF '
DEFAULT_EXTENSION = '(*.PDF)'
DEFAULT_FILE_NAME = 'file.pdf'
FILE_FILTER = 'PDF Format(*.PDF)'
INITIAL_DIRECTORY = 'C:\Documents and Settings\Administrator\Desktop'
WITH_ENCODING =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
FILENAME = W_FILE_NAME
PATH = W_FILE_PATH
FULLPATH = W_FULL_PATH
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " SAVE_DIALOG
*& Form DOWNLOAD
FORM DOWNLOAD .
Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = GV_BIN_FILESIZE
FILENAME = W_FULL_PATH
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = GT_PDF_TAB
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DOWNLOAD
*& Form SEND_MAIL
FORM SEND_MAIL .
***changes by rajan
*DATA : v_first TYPE USER_ADDR-NAME_FIRST,
V_LAST TYPE USER_ADDR-NAME_LAST.
DATA : detail TYPE STRING.
*SELECT SINGLE NAME_FIRST NAME_LAST FROM
USER_ADDR INTO (V_FIRST,V_LAST)
WHERE BNAME = syst-UNAME.
CONCATENATE v_first V_LAST INTO detail SEPARATED BY space.
data : v_po_no TYPE vbkd-bstkd,
v_po_date TYPE vbkd-bstdk.
data : day TYPE STRING,
month type STRING,
year TYPE STRING.
data : date TYPE STRING.
SELECT SINGLE BSTKD BSTDK
FROM VBKD
INTO (v_po_no,v_po_date)
WHERE VBELN = P_VBELN.
day = v_po_date+6(2).
month = v_po_date+4(2).
year = v_po_date+0(4).
CONCATENATE day '/' month '/' year INTO date.
CONCATENATE 'Please Find attached Order Acceptance against your P.O.No.' v_po_no 'dated' date '.' INTO detail SEPARATED BY
space.
**u2022 Assigning the Description of the object sent in the mail
CLEAR GS_DOCDATA.
GS_DOCDATA-OBJ_NAME = GC_TST.
GS_DOCDATA-OBJ_DESCR = GC_TESTING.
*u2022 Assigning the email id to Structure of the API Recipient List table
CLEAR : GT_RECLIST, GS_RECLIST.
GS_RECLIST-RECEIVER = P_MAIL. "
GS_RECLIST-REC_TYPE = 'U'."'G' ."'O'. "'B'. "'U'.
APPEND GS_RECLIST TO GT_RECLIST.
mail body rajan
I_OBJTXT = 'Dear Sir/Madam.'.
APPEND I_OBJTXT.
I_OBJTXT = detail.
APPEND I_OBJTXT.
I_OBJTXT = ''.
APPEND I_OBJTXT.
I_OBJTXT = 'Thanks.'.
APPEND I_OBJTXT.
I_OBJTXT = 'Best Regards,'.
APPEND I_OBJTXT.
I_OBJTXT = 'For Bilcare Ltd.'.
APPEND I_OBJTXT.
DESCRIBE TABLE i_objtxt LINES gv_desc_lines.
*DESCRIBE TABLE i_objtxt LINES v_lines_txt.
CLEAR I_OBJTXT.
READ TABLE I_OBJTXT INDEX gv_desc_lines.
if sy-subrc = 0.
Document information.
GS_DOCDATA-obj_name = 'ord_accept'.
GS_DOCDATA-expiry_dat = sy-datum + 10.
GS_DOCDATA-obj_descr = 'Order Acceptance'.
GS_DOCDATA-sensitivty = 'F'. "Functional object
GS_DOCDATA-doc_size = gv_desc_lines * 255.
CLEAR Gs_OBJPACK-transf_bin.
Start line of object header in transport packet
GS_OBJPACK-TRANSF_BIN = 'X'.
GS_OBJPACK-doc_size = gv_desc_lines * 255.
GS_OBJPACK-HEAD_START = 1.
GS_OBJPACK-HEAD_NUM = 0.
GS_OBJPACK-BODY_START = 1.
GS_OBJPACK-BODY_NUM = gv_desc_lines.
GS_OBJPACK-DOC_TYPE = 'RAW'.
GS_OBJPACK-OBJ_NAME = 'ORDER_ACCEPTANCE'.
GS_OBJPACK-OBJ_DESCR = 'ORDER_ACCEPTANCE.PDF'.
APPEND GS_OBJPACK TO GT_OBJPACK.
GS_OBJPACK-HEAD_START = 1.
GS_OBJPACK-HEAD_NUM = 0.
GS_OBJPACK-BODY_START = 1.
GS_OBJPACK-doc_type = 'RAW'.
*APPEND GS_OBJPACK TO GT_OBJPACK.
ENDIF.
*u2022 Passing the SAP Script text lines to SAPoffice: Single List with Column Length 255 table
CLEAR : GS_OBJBIN, GS_PDF_TAB.
LOOP AT GT_PDF_TAB INTO GS_PDF_TAB.
GV_POS = 255 - GV_LEN.
IF GV_POS > 134. "length of pdf_table
GV_POS = 134.
ENDIF.
GS_OBJBIN+GV_LEN = GS_PDF_TAB(GV_POS).
GV_LEN = GV_LEN + GV_POS.
IF GV_LEN = 255. "length of out (contents_bin)
APPEND GS_OBJBIN TO GT_OBJBIN.
CLEAR: GS_OBJBIN, GV_LEN.
IF GV_POS < 134.
GS_OBJBIN = GS_PDF_TAB+GV_POS.
GV_LEN = 134 - GV_POS.
ENDIF.
ENDIF.
ENDLOOP.
IF GV_LEN > 0.
APPEND GS_OBJBIN TO GT_OBJBIN.
ENDIF.
*u2022 Filling the details in SAPoffice: Description of Imported Object Components table
DESCRIBE TABLE GT_OBJBIN LINES GV_TAB_LINES.
CLEAR GS_OBJBIN.
READ TABLE GT_OBJBIN INTO GS_OBJBIN INDEX GV_TAB_LINES.
IF SY-SUBRC = 0.
GS_OBJPACK-DOC_SIZE = ( GV_TAB_LINES - 1 ) * 255 + STRLEN( GS_OBJBIN ).
GS_OBJPACK-TRANSF_BIN = 'X'.
GS_OBJPACK-HEAD_START = 1.
GS_OBJPACK-HEAD_NUM = 0.
GS_OBJPACK-BODY_START = 1.
GS_OBJPACK-BODY_NUM = GV_TAB_LINES.
GS_OBJPACK-DOC_TYPE = 'PDF'.
GS_OBJPACK-OBJ_NAME = 'ORDER_ACCEPTANCE'.
GS_OBJPACK-OBJ_DESCR = 'Order Acceptance'.
APPEND GS_OBJPACK TO GT_OBJPACK.
ENDIF.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = GS_DOCDATA
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
PACKING_LIST = GT_OBJPACK
OBJECT_HEADER = I_OBJTXT
CONTENTS_BIN = GT_OBJBIN
CONTENTS_TXT = I_OBJTXT
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
RECEIVERS = GT_RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
WRITE 'Sent Successfully'.
MESSAGE 'Sent Successfully' TYPE 'I'.
CALL TRANSACTION 'YMSL20'.
LEAVE LIST-PROCESSING.
ENDIF.
SUBMIT RSCONN01
WITH MODE EQ 'INT'
AND RETURN.
ENDFORM. " SEND_MAIL
Thanks
Ankur Sharma -
Hi experts,
We are in Oralce EBS v11.5.10.2. And need Purchase order approval through e-mail.
pl guide me step by step process for configure.
regards,
mahesYou need to setup the mailer (outbound & inbound). You can refer "Oracle Workflow Administrator's Guide" => "Step 6: Implementing Notification Mailers" for more details.
Thanks, Raja -
PO send to vendor through e-mail
Hi All,
while sending the PO to vendor through e mail, some POs sent to vendor. but some are not. I have seen the in the vendor master address screen the e mail is correct.
And i have seen the messages in PO , the medium 5 (external send) is also maintained for the all POs which is sent and not sent.
So please guide in this in which part the error will be possible
Thanks in advance
with regards
AllenFollow this
Basically there are two mail types: Internet mail (external mail) and SAPOffice mail.
Mail is sent via the output determination in both cases.
If you use the external mail, the message for the purchasing document is converted into a corresponding text file which is sent to the vendor via the Internet.
SAPOffice mail is sent only within the R/3 System and has mainly the function of providing information.
In particular, it is not possible to attach a message (form) for a purchasing document to a SAPOffice mail.
When using external mail, the following basic settings are required:
1. You must maintain an e-mail address in the address in the vendor master.
2. The same applies to your own user master. You also have to specify an e-mail address there in order to identify the sender.
o Note that it is not possible to change the e-mail address of the vendor
o You can use a temporary email address in Transaction ME21N.
3. For the output type for default values, a communication strategy needs to be maintained in the Customizing that supports the e-mail.
You can find the definition of the communication strategy in the Customizing via the following path: (SPRO -> IMG -> SAP Web Application Server -> Basic Services -> Message Control -> Define
Communication Strategy). As a default, communication strategy CS01 is delivered. This already contains the necessary entry for the external communication. Bear in mind that without a suitable communication strategy it is not possible to communicate with a partner via Medium 5 (external sending).
4. Use the standard SAP environment (program 'SAPFM06P', FORM routine 'ENTRY_NEU' and form 'MEDRUCK') as the processing routines.
5. In the condition records for the output type (for example,Transaction MN04), use medium '5' (External send).
6. You can use Transaction SCOT to trigger the output manually. The prerequisite for a correct sending is that the node is set correctly. This is not described here, but it must have already been
carried out.
7. To be able to display, for example, the e-mail in Outlook, enter PDF as the format in the node.
To use the SAPOffice mail, the following basic settings are required:
1. For the output type for default values, a communication strategy needs to be maintained in the Customizing that supports the e-mail.
You can branch to the maintenance of the communication strategy via the input help.
2. Use the SAP standard environment (program "RSNASTSO" and FORM routine "SAPOFFICE_AUFRUF") as the processing routines.
3. In the condition records for the output type (for example,Transaction MN04), use medium '7' (SAPOffice) and also partner role 'MP' (mail partner).
Additional settings:
Problem:
How can you both change the mail title and text for the sending of a mail message and maintain a replacement parameter, for example a document number.
Solution:
1. The replacement routine is maintained in the Customizing for the output type in the detail screen on the 'General data' tab under 'Replacement of text symbols' (for Release < 4.6B, this can be found on the 'Mail' tab page).
Program: SAPMM06E
FORM routine: TEXT_SYMBOL_REPLACE
2. Maintain mail title and text.
o If you want to send a purchase order within an R/3 system using the SAP office, you can maintain both the mail title ('Re:') and also a mail text in the Customizing for the output type To do this, select the directory mail title and text for the corresponding message type.
o If you want to send a purchase order as (external) mail, for example, to a vendor, you have to maintain the mail title in the condition record for the output type (for example in Transaction MN05) on the 'Communication method' tab page. Enter the mail title in the 'Text for cover page' field. You cannot maintain an additional mail text.
o Note that the values from the mail title are used to create the description for the attachment.
3. The replacement parameters must be enclosed by &. Example: You want to enter the title 'PO number '. For this you have to enter the following in the Document Title field (Message Customizing ->
sub-option: Mail title and texts) 'PO number &EKKO-EBELN&' -
Smartform - PDF attachment through E-mail issue
Hi,
A custom form and custom program was created to print the Purchase order information through ME21N, 22n and 23n.
It also has E-mail option. when output medium 5(Simple mail) and 7(External send), email will be send to respective mail-id's with the PDF attachment.
I have issue at the time of saving PO which processed with medium 5. when i save A popup appears "Express document update was terminated received from author". Brief message about it is
"Error Info... 00 671: ABAP/4 processor: COMMIT_IN_POSTING"
In Smartform driver program i am using below function modules to convert OTF into PDF and send through e-mail.
Function Module: CONVERT_OTF.
Function Module: SO_DOCUMENT_SEND_API1.
I am not sure, what i missed out. Can you guys tell is this the correct way to send PDF attachment through E-mail or i missed out any function module for commit.
Regards,
Hemanth.
Edited by: keerthipati hemanth on Jul 31, 2008 1:15 PM
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Jul 31, 2008 3:14 PMHi Hemant,
Below is the code for the downloading of the smartform into the PDF Format.
* Program Name : ZPPREP_SHOPFLOOR_VIEWER_ZOOM
REPORT zppeerep_shorepfloor_viewer_zoom.
* T A B L E S D E C L A R A T I O N
*---Tables Used.
TABLES: afpo,
mara,
marc,
aufk,
afko,
itcoo,
nast, "Messages
*nast, "Messages
tnapr, "Programs & Forms
addr_key,
arc_params, "Archive parameters
toa_dara. "Archive parameters
* I N T E R N A L T A B L E S D E C L A R A T I O N
*--Internal Tables Used.
* D A T A D E C L A R A T I O N
*--Global Variables Used.
DATA: ws_matnr LIKE afpo-matnr,
ws_werks LIKE aufk-werks,
ws_mtart LIKE mara-mtart,
ws_wrkst LIKE mara-wrkst,
ws_fname TYPE rs38l_fnam,
ws_ctrlp TYPE ssfctrlop,
ws_optns TYPE ssfcompop,
w_padest LIKE tsp03l-padest. "BMC01+
DATA: da_message_printed(1) TYPE c,
da_preview_processed(1) TYPE c,
repeat(1) TYPE c,
da_subrc LIKE sy-subrc.
DATA: w_otfdata TYPE ssfcrescl.
DATA: BEGIN OF it_itcoo OCCURS 0.
INCLUDE STRUCTURE itcoo.
DATA: END OF it_itcoo.
DATA: w_otf TYPE itcoo.
*--Data Declaration for Printing Layout
DATA: ls_itcpo TYPE itcpo.
DATA: lf_repid TYPE sy-repid.
DATA: lf_device TYPE tddevice.
DATA: cf_retcode TYPE sy-subrc.
DATA: ls_recipient TYPE swotobjid.
DATA: ls_sender TYPE swotobjid.
DATA: ls_control_param TYPE ssfctrlop.
DATA: ls_composer_param TYPE ssfcompop.
DATA: ls_addr_key LIKE addr_key.
DATA: w_screen(1) TYPE c.
DATA: xscreen(1) TYPE c.
DATA: da_mess LIKE vbfs OCCURS 0 WITH HEADER LINE.
* C O N S T A N T S
CONSTANTS: c_fas1(8) TYPE c VALUE 'PRINTFAS',
c_fas2(15) TYPE c VALUE 'PRINTFASDRAWING',
c_wip1(8) TYPE c VALUE 'PRINTWIP',
c_wip2(15) TYPE c VALUE 'PRINTWIPDRAWING'.
* S E L E C T I O N - S C R E E N.
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-bl1.
* Production order
PARAMETERS: p_aufnr LIKE afpo-aufnr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK bl1.
START-OF-SELECTION.
*--Begin of Commenting "
*--Get Partially processed orders
MOVE: sy-mandt TO nast-mandt,
'V1' TO nast-kappl,
p_aufnr TO nast-objky,
p_aufnr TO nast-parnr,
sy-langu TO nast-spras,
sy-datum TO nast-erdat,
'1' TO nast-nacha,
'3' TO nast-vsztp,
'X' TO nast-manue,
sy-uname TO nast-usnam,
'DFLT' TO nast-ldest,
sy-langu TO nast-tdspras,
'Shop Floor Papers' TO nast-tdcovtitle,
'1' TO nast-tdarmod,
'BUS2032' TO nast-objtype.
*--Printer settings
CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
EXPORTING
pi_nast = nast
pi_repid = sy-repid
IMPORTING
pe_returncode = cf_retcode
pe_itcpo = ls_itcpo
pe_device = lf_device
pe_recipient = ls_recipient
pe_sender = ls_sender.
MOVE-CORRESPONDING ls_itcpo TO ls_composer_param.
ls_control_param-device = 'PRINTER'.
ls_control_param-no_dialog = 'X'.
ls_control_param-preview = 'X'.
ls_control_param-getotf = ls_itcpo-tdgetotf.
ls_control_param-langu = sy-langu.
*--End of Commenting "
*--Start of Addition "
CLEAR: ws_werks.
SELECT SINGLE werks
INTO ws_werks
FROM aufk
WHERE aufnr = p_aufnr.
CLEAR: ws_matnr.
SELECT SINGLE plnbez
INTO ws_matnr
FROM afko
WHERE aufnr = p_aufnr.
CLEAR: marc.
SELECT SINGLE matgr
INTO marc-matgr
FROM marc
WHERE matnr = ws_matnr
AND werks = ws_werks.
*--End of Addition "
* CHECK NOT ws_matnr IS INITIAL.
IF NOT ws_matnr IS INITIAL.
*--Start of Addition
SELECT SINGLE matgr
INTO marc-matgr
FROM marc
WHERE matnr = ws_matnr
AND werks = ws_werks.
*--Start of Addition BY Rapidigm01_01+
ELSE.
marc-matgr = c_wip1.
ENDIF.
*--End Of Addition BY Rapidigm01_01+
*--End of Addition "
END-OF-SELECTION.
PERFORM call_smartform.
* F O R M R O U T I N E S
*& Form call_smartform
* text
FORM call_smartform.
CLEAR: ws_ctrlp, ws_optns, ws_fname.
*--Start of Addition "
TRANSLATE marc-matgr TO UPPER CASE.
IF marc-matgr = c_fas1 OR
marc-matgr = c_fas2.
PERFORM call_paper_a.
ELSEIF marc-matgr = c_wip1 OR
marc-matgr = c_wip2.
PERFORM call_paper_b.
ENDIF.
*--End of Addition "
ENDFORM. "call_smartform
*& Form call_paper_a
* text
FORM call_paper_a.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
*>>BC SPARTA03 DATE: 19/05/2008
* formname = 'ZPPSF_SHOP_FLOOR_PAPER_A' "Rapidigm03_01-
formname = 'ZPPSF_SHOP_FLOOR_PAPER_C' "Rapidigm03_01-
*<<EC SPARTA03 DATE: 19/05/2008
* formname = 'ZPPSF_SHOP_FLOOR_PAPER_A_2893' "Rapidigm03_01+
IMPORTING
fm_name = ws_fname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
CHECK NOT ws_fname IS INITIAL.
CLEAR w_otfdata.
ls_control_param-getotf = 'X'.
CALL FUNCTION ws_fname
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = ' '
is_nast = nast
aufnr = p_aufnr
flag_orig = 'X'
IMPORTING
job_output_info = w_otfdata
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
LOOP AT w_otfdata-otfdata INTO w_otf.
APPEND w_otf TO it_itcoo.
ENDLOOP.
CALL FUNCTION 'HR_IT_DISPLAY_WITH_PDF'
TABLES
otf_table = it_itcoo.
ENDFORM. "call_paper_a
*& Form call_paper_b
* text
FORM call_paper_b.
DATA: ws_doknr TYPE draw-doknr,
ws_dokvr TYPE draw-dokvr.
CLEAR: ws_doknr, ws_dokvr.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZPPSF_SHOP_FLOOR_PAPER_B'
IMPORTING
fm_name = ws_fname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
CHECK NOT ws_fname IS INITIAL.
CLEAR w_otfdata.
ls_control_param-getotf = 'X'.
CALL FUNCTION ws_fname
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = ' '
is_nast = nast
aufnr = p_aufnr
doknr = ws_doknr
dokvr = ws_dokvr
flag_orig = 'X'
IMPORTING
job_output_info = w_otfdata
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
LOOP AT w_otfdata-otfdata INTO w_otf.
APPEND w_otf TO it_itcoo.
ENDLOOP.
CALL FUNCTION 'HR_IT_DISPLAY_WITH_PDF'
TABLES
otf_table = it_itcoo.
ENDFORM. "call_paper_b -
How to create process instance throught PAPI?
Hi,
Can someone share how do we use PAPI to create a process instance for the Expense Management process (process in the BPM tutorial)?
I believe it is through calling the processCreateInstance() method from a ProcessServiceSession object, however, what exactly do we pass in as a parameter? I tried simply by passing in the process name and an empty Arguments object and the following exception was logged:
Feb 18, 2009 9:08:43 PM com.sun.corba.se.impl.orbutil.CacheTable put_table
WARNING: "IOP00710275: (INTERNAL) Old entry in serialization indirection table has a different value than the value being added with the same key"
org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 275 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.duplicateIndirectionOffset(ORBUtilSystemException.java:5589)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.duplicateIndirectionOffset(ORBUtilSystemException.java:5611)
at com.sun.corba.se.impl.orbutil.CacheTable.put_table(CacheTable.java:97)
at com.sun.corba.se.impl.orbutil.CacheTable.put(CacheTable.java:86)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1068)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:873)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:863)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java:269)
at com.sun.corba.se.impl.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:363)
at com.sun.corba.se.impl.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:526)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:345)
at java.util.TreeMap.buildFromSorted(TreeMap.java:2442)
at java.util.TreeMap.buildFromSorted(TreeMap.java:2384)
at java.util.TreeMap.readObject(TreeMap.java:2330)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.se.impl.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1694)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1212)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:400)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:327)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1989)
at com.sun.corba.se.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2213)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1221)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:400)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:327)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1989)
at com.sun.corba.se.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2213)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1221)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:400)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:327)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
at com.sun.corba.se.impl.io.ValueHandlerImpl.read_Array(ValueHandlerImpl.java:756)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:325)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
at fuego.papi.impl.j2ee._EJBSecureEngineInterface_Stub.getProcesses(Unknown Source)
at fuego.papi.impl.j2ee.EJBSecureEngineInterfaceWrapper.getProcesses(EJBSecureEngineInterfaceWrapper.java:297)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at fuego.papi.impl.AbstractSecureEngineHandler.invokeInternal(AbstractSecureEngineHandler.java:49)
at fuego.papi.impl.j2ee.EJBSecureEngineHandler.doInvoke(EJBSecureEngineHandler.java:105)
at fuego.papi.impl.j2ee.EJBSecureEngineHandler.invoke(EJBSecureEngineHandler.java:56)
at $Proxy14.getProcesses(Unknown Source)
at fuego.papi.impl.AbstractProcessLoader.createProcess(AbstractProcessLoader.java:49)
at fuego.papi.impl.AbstractProcessLoader.createProcess(AbstractProcessLoader.java:36)
at fuego.papi.impl.SessionProcessLoader.load(SessionProcessLoader.java:254)
at fuego.papi.impl.ProcessManager.get(ProcessManager.java:894)
at fuego.papi.impl.ProcessServiceImpl.getProcess(ProcessServiceImpl.java:1364)
at fuego.papi.impl.SessionProcessManager.getProcess(SessionProcessManager.java:143)
at fuego.papi.impl.ProcessServiceSessionImpl.processGet(ProcessServiceSessionImpl.java:2601)
at fuego.papi.impl.ProcessServiceSessionImpl.checkBeginPermissions(ProcessServiceSessionImpl.java:4222)
at fuego.papi.impl.ProcessServiceSessionImpl.processCreateInstance(ProcessServiceSessionImpl.java:3113)
at fuego.papi.impl.ProcessServiceSessionImpl.processCreateInstance(ProcessServiceSessionImpl.java:3099)
at com.test.papi.TestPAPI.main(TestPAPI.java:39)
Could not perform the requested operation
fuego.papi.ProcessNotAvailableException: Process '/ExpenseReport#Default-1.0' not available.
at fuego.papi.impl.AbstractProcessLoader.createProcess(AbstractProcessLoader.java:71)
at fuego.papi.impl.AbstractProcessLoader.createProcess(AbstractProcessLoader.java:36)
at fuego.papi.impl.SessionProcessLoader.load(SessionProcessLoader.java:254)
at fuego.papi.impl.ProcessManager.get(ProcessManager.java:894)
at fuego.papi.impl.ProcessServiceImpl.getProcess(ProcessServiceImpl.java:1364)
at fuego.papi.impl.SessionProcessManager.getProcess(SessionProcessManager.java:143)
at fuego.papi.impl.ProcessServiceSessionImpl.processGet(ProcessServiceSessionImpl.java:2601)
at fuego.papi.impl.ProcessServiceSessionImpl.checkBeginPermissions(ProcessServiceSessionImpl.java:4222)
at fuego.papi.impl.ProcessServiceSessionImpl.processCreateInstance(ProcessServiceSessionImpl.java:3113)
at fuego.papi.impl.ProcessServiceSessionImpl.processCreateInstance(ProcessServiceSessionImpl.java:3099)
at com.test.papi.TestPAPI.main(TestPAPI.java:39)
Caused by: fuego.papi.impl.EngineExecutionException: Process execution engine execution error.
at fuego.papi.impl.j2ee.EJBSecureEngineHandler.doInvoke(EJBSecureEngineHandler.java:146)
at fuego.papi.impl.j2ee.EJBSecureEngineHandler.invoke(EJBSecureEngineHandler.java:56)
at $Proxy14.getProcesses(Unknown Source)
at fuego.papi.impl.AbstractProcessLoader.createProcess(AbstractProcessLoader.java:49)
... 10 more
Caused by: org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 275 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.duplicateIndirectionOffset(ORBUtilSystemException.java:5589)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.duplicateIndirectionOffset(ORBUtilSystemException.java:5611)
at com.sun.corba.se.impl.orbutil.CacheTable.put_table(CacheTable.java:97)
at com.sun.corba.se.impl.orbutil.CacheTable.put(CacheTable.java:86)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1068)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:873)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:863)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java:269)
at com.sun.corba.se.impl.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:363)
at com.sun.corba.se.impl.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:526)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:345)
at java.util.TreeMap.buildFromSorted(TreeMap.java:2442)
at java.util.TreeMap.buildFromSorted(TreeMap.java:2384)
at java.util.TreeMap.readObject(TreeMap.java:2330)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.se.impl.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1694)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1212)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:400)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:327)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1989)
at com.sun.corba.se.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2213)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1221)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:400)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:327)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1989)
at com.sun.corba.se.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2213)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1221)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:400)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:327)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
at com.sun.corba.se.impl.io.ValueHandlerImpl.read_Array(ValueHandlerImpl.java:756)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:325)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
at fuego.papi.impl.j2ee._EJBSecureEngineInterface_Stub.getProcesses(Unknown Source)
at fuego.papi.impl.j2ee.EJBSecureEngineInterfaceWrapper.getProcesses(EJBSecureEngineInterfaceWrapper.java:297)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at fuego.papi.impl.AbstractSecureEngineHandler.invokeInternal(AbstractSecureEngineHandler.java:49)
at fuego.papi.impl.j2ee.EJBSecureEngineHandler.doInvoke(EJBSecureEngineHandler.java:105)
... 13 more
I'm wondering why does it complain that "fuego.papi.ProcessNotAvailableException: Process '/ExpenseReport#Default-1.0' not available.", when the ExpenseReport process is indeed a process that was published?
P.S.: I know this thread is sort of a duplicate of another thread, however I hope we can get some real examples of how to create a process instance for the Expense Management project, using PAPI (instead of PAPI webservice).
Edited by: sylarchong on Feb 18, 2009 5:20 AM
Edited by: sylarchong on Feb 18, 2009 5:21 AMHi Mark,
Thanks for your prompt reply.. I tried with the above option but still am facing the same problem.
Let me give you the brief idea of what am working on;
1) I created a process using Oracle BPM Studio V: 10.3.1.0 & Build: #94375
2) I publish & deploy the process using Oracle BPM Admin Center which running on top of tomcat. But in the configuration I configure the directory as well as weblogic server.
3) I created a "Java Project" & included following jar file "b1base.jar","b1oracle.jar","b1util.jar","bcel.jar","ejb-api.jar","fuegopapi-client.jar","jms-api.jar","ojdbc14.jar","weblogic.jar","wljmsclient.jar".
4) I am using below program to create a PAPI Process Instance;
package ibm.com.papi;
import java.util.Properties;
import fuego.papi.CommunicationException;
import fuego.papi.InstanceInfo;
import fuego.papi.OperationException;
import fuego.papi.ProcessService;
import fuego.papi.ProcessServiceSession;
public class PAPIWithDirectoryFileExample {
public static void main(String[] args) {
// ///////////////// API Initialization ///////////////////
Properties configuration = new Properties();
configuration.setProperty(ProcessService.DIRECTORY_ID, "default");
configuration.setProperty(ProcessService.DIRECTORY_PROPERTIES_FILE, "C://tmp//directory.xml");
configuration.setProperty(ProcessService.INSTANCES_CACHE_SIZE, "50000");
configuration.setProperty(ProcessService.WORKING_FOLDER, "c://tmp");
configuration.setProperty(ProcessService.UPDATE_SESSIONS_VIEWS, "true");
System.setProperty("fuego.j2ee.initialctx.file","C:\\tmp\\engine.properties");
System.setProperty("fuego.j2ee.initialctx.resource","engine.properties");
System.setProperty("fuego.j2ee.initialctx.url","file://tmp/engine.properties");
//engine.properties include below settings
//System.setProperty("java.naming.factory.initial", "weblogic.jndi.WLInitialContextFactory");
//System.setProperty("java.naming.provider.url", "t3://localhost:7001");
try {
ProcessService processService = ProcessService.create(configuration);
///////////////// Establish a session ///////////////////
ProcessServiceSession session = processService.createSession(
"username", "pwd", "host");
for (String processId : session.processesGetIds()) {
System.out.println("\n Process: " + processId);
for (InstanceInfo instance : session
.processGetInstances(processId)) {
System.out.println(" -> " + instance.getId());
fuego.papi.Arguments papiArgs= fuego.papi.Arguments.create();
papiArgs.putArgument("inputNameArg", "inputString");
InstanceInfo instInfo = null;
instInfo = session.processCreateInstance("/Process#Default-1.0",papiArgs);
String strInstanceID = instInfo.getId();
System.out.println ("strInstanceID => [" + strInstanceID + "]" );
// ///////////////// Close the session ///////////////////
session.close();
// ///////////////// Release API Resources ///////////////////
processService.close();
} catch (CommunicationException e) {
System.out.println("Could not connect to Directory Service");
e.printStackTrace();
} catch (OperationException e) {
System.out.println("Could not perform the requested operation");
e.printStackTrace();
5) Error Log;
Feb 19, 2010 12:23:16 PM com.sun.corba.se.impl.orbutil.CacheTable put_table
WARNING: "IOP00710275: (INTERNAL) Old entry in serialization indirection table has a different value than the value being added with the same key"
org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 275 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.duplicateIndirectionOffset(ORBUtilSystemException.java:5589)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.duplicateIndirectionOffset(ORBUtilSystemException.java:5611)
at com.sun.corba.se.impl.orbutil.CacheTable.put_table(CacheTable.java:97)
at com.sun.corba.se.impl.orbutil.CacheTable.put(CacheTable.java:86)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1068)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:873)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:863)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java:269)
at com.sun.corba.se.impl.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:363)
at com.sun.corba.se.impl.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:526)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:345)
at java.util.TreeMap.buildFromSorted(TreeMap.java:2442)
at java.util.TreeMap.buildFromSorted(TreeMap.java:2384)
at java.util.TreeMap.readObject(TreeMap.java:2330)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.se.impl.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1694)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1212)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:400)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:327)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1989)
at com.sun.corba.se.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2213)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1221)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:400)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:327)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1989)
at com.sun.corba.se.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2213)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1221)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:400)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:327)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
at com.sun.corba.se.impl.io.ValueHandlerImpl.read_Array(ValueHandlerImpl.java:756)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:325)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
at fuego.papi.impl.j2ee._EJBSecureEngineInterface_Stub.getProcesses(Unknown Source)
at fuego.papi.impl.j2ee.EJBSecureEngineInterfaceWrapper.getProcesses(EJBSecureEngineInterfaceWrapper.java:297)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at fuego.papi.impl.AbstractSecureEngineHandler.invokeInternal(AbstractSecureEngineHandler.java:49)
at fuego.papi.impl.j2ee.EJBSecureEngineHandler.doInvoke(EJBSecureEngineHandler.java:105)
at fuego.papi.impl.j2ee.EJBSecureEngineHandler.invoke(EJBSecureEngineHandler.java:56)
at $Proxy14.getProcesses(Unknown Source)
at fuego.papi.impl.AbstractProcessLoader.createProcess(AbstractProcessLoader.java:49)
at fuego.papi.impl.AbstractProcessLoader.createProcess(AbstractProcessLoader.java:36)
at fuego.papi.impl.SessionProcessLoader.load(SessionProcessLoader.java:254)
at fuego.papi.impl.ProcessManager.get(ProcessManager.java:894)
at fuego.papi.impl.ProcessServiceImpl.getProcess(ProcessServiceImpl.java:1364)
at fuego.papi.impl.SessionProcessManager.getProcess(SessionProcessManager.java:143)
at fuego.papi.impl.ProcessServiceSessionImpl.processGet(ProcessServiceSessionImpl.java:2660)
at fuego.papi.impl.ProcessServiceSessionImpl.checkBeginPermissions(ProcessServiceSessionImpl.java:4281)
at fuego.papi.impl.ProcessServiceSessionImpl.processCreateInstance(ProcessServiceSessionImpl.java:3172)
at fuego.papi.impl.ProcessServiceSessionImpl.processCreateInstance(ProcessServiceSessionImpl.java:3158)
at ibm.com.papi.PAPIWithDirectoryFileExample.main(PAPIWithDirectoryFileExample.java:71)
Could not perform the requested operation
fuego.papi.ProcessNotAvailableException: Process '/Process#Default-1.0' not available.
at fuego.papi.impl.AbstractProcessLoader.createProcess(AbstractProcessLoader.java:71)
at fuego.papi.impl.AbstractProcessLoader.createProcess(AbstractProcessLoader.java:36)
at fuego.papi.impl.SessionProcessLoader.load(SessionProcessLoader.java:254)
at fuego.papi.impl.ProcessManager.get(ProcessManager.java:894)
at fuego.papi.impl.ProcessServiceImpl.getProcess(ProcessServiceImpl.java:1364)
at fuego.papi.impl.SessionProcessManager.getProcess(SessionProcessManager.java:143)
at fuego.papi.impl.ProcessServiceSessionImpl.processGet(ProcessServiceSessionImpl.java:2660)
at fuego.papi.impl.ProcessServiceSessionImpl.checkBeginPermissions(ProcessServiceSessionImpl.java:4281)
at fuego.papi.impl.ProcessServiceSessionImpl.processCreateInstance(ProcessServiceSessionImpl.java:3172)
at fuego.papi.impl.ProcessServiceSessionImpl.processCreateInstance(ProcessServiceSessionImpl.java:3158)
at ibm.com.papi.PAPIWithDirectoryFileExample.main(PAPIWithDirectoryFileExample.java:71)
Caused by: fuego.papi.impl.EngineExecutionException: Process execution engine execution error.
at fuego.papi.impl.j2ee.EJBSecureEngineHandler.doInvoke(EJBSecureEngineHandler.java:146)
at fuego.papi.impl.j2ee.EJBSecureEngineHandler.invoke(EJBSecureEngineHandler.java:56)
at $Proxy14.getProcesses(Unknown Source)
at fuego.papi.impl.AbstractProcessLoader.createProcess(AbstractProcessLoader.java:49)
... 10 more
Caused by: org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 275 completed: No
Please help me to resolve the above issue.
Thanks & Regards,
Ankur Oswal -
Initiating BPM Process Instances from External Web Service Call
I'm attempting to update the HelloWorld example so that I can create an instance of the process from an External Web Services Call rather than via the Workspace. Our current SOA Architecture is configured so that all BPM instances are managed through a .NET SmartClient via the Service Bus and the use of PAPI W/S and so I'm wishing to recreate this capability in the new BPM.
I understand the replacement for PAPI W/S is Human Workflow so I've therefore updated and republished the HelloWorld Example with an Exposed 'TaskService' Service for the Human Task within the BPM Process.
I've then attempted to reference the TaskService through our existing BPM, and have been able to import a number of generic WSDL's as follows:
Task Service
http://vmaquatestapp2:7001/integration/services/TaskService/TaskServicePort?WSDL
Task Metadata Service
http://vmaquatestapp2:7001/integration/services/TaskMetadataService/TaskMetadataServicePort?WSDL
Task Query Service
http://vmaquatestapp2:7001/integration/services/TaskQueryService/TaskQueryService?WSDL
When I examine the available operations for these generic services, there are quite a lot, each of which have a fairly complex schema. I believe I should be using the TaskService: InitiateTask Operation to create an instance of my BPM Process but my questions are:
- Is the above the correct method of interacting with BPM Instances from an external system such as the Service Bus?
- Does anyone have any examples of a basic XML payload that would initiate a process instance?I created an process with a message start event and can call it from an external web service call. I can also pass input arguments and map those to process data objects. However I can not find how to return data as response to the external web service call as e.g. the process instance id.
Is it possible to this?
Gr,
Gert Jan Kersten -
Process instance fails to terminate.
I start a process instance programmatically through a web service call, passing a couple of parameters to the starting instance. But then, when the last activity is completed and the end event is reached, there is a failure. As a consequence, the instance is not ended. The failure is the following:
com.sap.glx.core.kernel.api.TransitionException: An exception occurred while executing the script "_Approvazione_Vie_Aeree:END_CONTROL_EVENT_End(
com.sap.glx.adapter.BPMNAdapter:Token_0_Approvazione_Vie_Aeree_84bb2f9ca021a18a7f0398d219d89556 token,
com.sap.glx.adapter.BPMNAdapter:Instance_0_Approvazione_Vie_Aeree_84bb2f9ca021a18a7f0398d219d89556 parent){
exit=new com.sap.glx.adapter.BPMNAdapter:Exit();
exit:addParameter(token);
exit:addParameter(parent);
exit:onActivation("4B55B53890073FD304FF11DFCE9002004C4F4F50", parent, token);
delete exit;
controller=new com.sap.glx.adapter.internal.ExceptionAdapter:ExceptionController();
controller:setContext(token);
delete controller;
kicker=parent:kicker;
grampa=parent:parent;
response=new com.sap.glx.adapter.BPMNAdapter:Response("sysdat.it/vieaeree_bpm/Pool/Approvazione_Vie_Aeree_e9c5b1215494d058c64477dc6840a7ee", "avvioVieaeree", grampa, kicker);
scope_business=new com.sap.glx.adapter.internal.TypeRegistry:Scope_8_Approvazione_Vie_Aeree_84bb2f9ca021a18a7f0398d219d89556(parent);
document=scope_business:instantiate("http://www.w3.org/2001/XMLSchema", "anyType");
delete scope_business;
mapper=new com.sap.glx.adapter.internal.Transformer:DataMapper();
yves_in=new com.sap.glx.adapter.internal.Transformer:Data();
yves_out=new com.sap.glx.adapter.internal.Transformer:Data();
yves_out:setData("http://sysdat.it/StartProcess/", "$http://sysdat.it/StartProcess/:avvioVieaereeResponse", document, "7E86E4BE818B213CFC42A775F27707D9");
mapper:map("4B55B53890073FD604FF11DFA74702004C4F4F50_84bb2f9ca021a18a7f0398d219d89556", yves_in, yves_out);
document=yves_out:getData("http://sysdat.it/StartProcess/", "$http://sysdat.it/StartProcess/:avvioVieaereeResponse", "7E86E4BE818B213CFC42A775F27707D9");
delete yves_in;
delete yves_out;
delete mapper;
response:setData(document);
delete token;
com.sap.glx.core.kernel.execution.transition.ScriptTransition.execute(ScriptTransition.java:69)
com.sap.glx.core.kernel.execution.transition.Transition.commence(Transition.java:241)
com.sap.glx.core.kernel.execution.LeaderWorkerPool$Follower.run(LeaderWorkerPool.java:125)
com.sap.glx.core.resource.impl.common.WorkWrapper.run(WorkWrapper.java:58)
com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator$1.run(ServiceUserManager.java:116)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAs(Subject.java:337)
com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator.run(ServiceUserManager.java:114)
com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
java.security.AccessController.doPrivileged(Native Method)
com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:169)
Any help will be appreciated.
Regards,
Livio.Hi Oliver,
thank you for your kind reply.
The stack trace I posted is all what is available from the place where I got it (Operation Management>Processes and tasks>Manage processes).
But looking in the general log, I found much more trace information!! At the very end I found the following:
Caused by: com.sap.glx.core.kernel.api.TransitionException: Cannot instantiate abstract SDO type commonj.sdo:DataObject.
at com.sap.glx.core.internaladapter.typeregistry.TypeRegistryImpl.instantiateSDO(TypeRegistryImpl.java:113)
at com.sap.glx.core.internaladapter.typeregistry.TypeRegistryImpl.access$000(TypeRegistryImpl.java:41)
at com.sap.glx.core.internaladapter.typeregistry.TypeRegistryImpl$3.invoke(TypeRegistryImpl.java:283)
at com.sap.glx.core.dock.impl.DockObjectImpl.invokeMethod(DockObjectImpl.java:463)
at com.sap.glx.core.kernel.trigger.config.Script$MethodInvocation.execute(Script.java:248)
at com.sap.glx.core.kernel.trigger.config.Script.execute(Script.java:791)
... 12 more
Hope this is helpful.
Livio. -
How to get process instance id
Hi,
We are invoking a long lived process from a client using Java API (EJB end point).
We are getting the JobId in return. Is there a way to get the process instance Id through API.
Searched a lot in the documentation. Finally inclining to query the table directlyTB_PROCESS_INSTANCE on LONG_LIVED_INVOCATION_ID.
Appreciate a lot if any expert point us to an API way of doing the sameWe have tried to use the following approach to get process instance id right after invoking a process.
- Define an OUT process variable to contain process id
- A set value step right after invocation sets this out variable with process id variable value which is available by default
- InvocationResponse.getOutputParameters() to read the output variable
The problem is in the map returned by getOutputParameters() is not having our output variable , but just the JobId.
Anyone tried this before? Are we missing sometiing?
Any expert help is highly appreciated..
Maybe you are looking for
-
ITunes (AppleTV) TV Show Episode Sort Order
I have purchased Dr Who Season 6 but it comes in two parts. Part One and Part Two. When these settle into iTunes in the TV series section they combine into one season but the sort (play) order is wrong. When viewing from within iTunes or through Appl
-
How to access / configure Web Content Management in NetWeaver
Hi, I am using SAP EP6.0 and KM is running there. I want to know that how can I access the Web Content Manager of NetWeaver. What configuration is required to access WCM? Any pointer will help me. Thanks in advance, Manish
-
ı try to re-download my purchased apps app store asked for money from me again
I try to re-download my purchased apps from app store. app store asked for money from me again
-
Lexical parameter and single quotes
I am using perl to build the lexical parameter that is being passed to the report builder. The perl builds an "in" statement for the where clause. In the data the users select some of the values may contain a single quote. I have used a perl script t
-
Exporting from Final Cut???
I have been working with FCP for 6 years. I have continued to upgrade versions of FCP. Computer crashed last week and I have had to reload all of my applications. Now when I export out of FCP I do not have the option of creating an MPEG2. What happpe