Expand my Community achievements bar.

Update Policy with a list<User>

Avatar

Level 5

Hello!

I'm developing a process in workbench to change a policy, by adding users to it. But I have just a list of user's ID. So I use the Find User to get the user and put it into a list<user>. Then I use the UpdatePolicy and passing the list as parameter.See the image:

sreen_Diego.PNG

I have the users in my var List: (LOG)

[13/05/10 11:17:06:879 BRT] 00000043 SystemOut     O [PID:-1] /process_data/listUsuarios - List: java.util.ArrayList:      Number of elements :2
{
1:com.adobe.idp.dsc.um.lookup.datamodel.User@4bb04bb0
2:com.adobe.idp.dsc.um.lookup.datamodel.User@45b445b4
}

But I get the following error when trying to update policy:

ALC-DSC-003-000: com.adobe.idp.dsc.DSCInvocationException: Invocation error.
at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:152)
at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:140)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.DocumentPassivationInterceptor.intercept(DocumentPassivationInterceptor.java:53)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(TransactionInterceptor.java:74)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTransactionCMTAdapterBean.java:357)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(EjbTransactionCMTAdapterBean.java:227)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EJSLocalStatelessEjbTransactionCMTAdapter_caf58c4f.doSupports(Unknown Source)
at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvider.java:104)
at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInterceptor.java:72)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStrategyInterceptor.java:55)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateInterceptor.java:37)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:188)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:121)
at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:129)
at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:93)
at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:225)
at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:66)
at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
at com.adobe.workflow.engine.PEUtil.invokeAction(PEUtil.java:861)
at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.transientInvoke(WorkflowDSCInvoker.java:347)
at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.invoke(WorkflowDSCInvoker.java:158)
at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:140)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.DocumentPassivationInterceptor.intercept(DocumentPassivationInterceptor.java:53)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(TransactionInterceptor.java:74)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTransactionCMTAdapterBean.java:357)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doRequiresNew(EjbTransactionCMTAdapterBean.java:299)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EJSLocalStatelessEjbTransactionCMTAdapter_caf58c4f.doRequiresNew(Unknown Source)
at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvider.java:143)
at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInterceptor.java:72)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStrategyInterceptor.java:55)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateInterceptor.java:37)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:188)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:121)
at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:129)
at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.invoke(AbstractMessageReceiver.java:329)
at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkEndpoint.invokeCall(SoapSdkEndpoint.java:139)
at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkEndpoint.invoke(SoapSdkEndpoint.java:81)
at sun.reflect.GeneratedMethodAccessor275.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1096)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1037)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.adobe.idp.dsc.provider.impl.soap.axis.InvocationFilter.doFilter(InvocationFilter.java:43)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.adobe.idp.um.auth.filter.CSRFFilter.doFilter(CSRFFilter.java:41)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:832)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:679)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:566)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by: com.adobe.edc.sdk.SDKException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: CORBA NO_IMPLEMENT 0x4f4d0001 No; nested exception is:
org.omg.CORBA.NO_IMPLEMENT: The sender's class RMI:com.adobe.idp.dsc.um.lookup.datamodel.User:FFF00FCE963354D3:6A624FE97B2C45F1 is not present on the local classpath, and the class is not marked as truncatable, so it cannot be unmarshaled.  vmcid: OMG  minor code: 1  completed: No -- Internal server error(error code bin: 1032, hex: 0x408)
at com.adobe.livecycle.rightsmanagement.RightsManagementService.throwSDKException(RightsManagementService.java:1012)
at com.adobe.livecycle.rightsmanagement.RightsManagementService.updatePolicy(RightsManagementService.java:1405)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:118)
... 98 more
Caused by: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: CORBA NO_IMPLEMENT 0x4f4d0001 No; nested exception is:
org.omg.CORBA.NO_IMPLEMENT: The sender's class RMI:com.adobe.idp.dsc.um.lookup.datamodel.User:FFF00FCE963354D3:6A624FE97B2C45F1 is not present on the local classpath, and the class is not marked as truncatable, so it cannot be unmarshaled.  vmcid: OMG  minor code: 1  completed: No
at com.ibm.CORBA.iiop.UtilDelegateImpl.wrapException(UtilDelegateImpl.java:720)
at javax.rmi.CORBA.Util.wrapException(Util.java:296)
at com.adobe.edc.policy._APSDocumentServicesManager_Stub.updatePolicy(_APSDocumentServicesManager_Stub.java:1688)
at com.adobe.livecycle.rightsmanagement.RightsManagementService.updatePolicy(RightsManagementService.java:1403)
... 103 more
Caused by: java.rmi.RemoteException: CORBA NO_IMPLEMENT 0x4f4d0001 No; nested exception is:
org.omg.CORBA.NO_IMPLEMENT: The sender's class RMI:com.adobe.idp.dsc.um.lookup.datamodel.User:FFF00FCE963354D3:6A624FE97B2C45F1 is not present on the local classpath, and the class is not marked as truncatable, so it cannot be unmarshaled.  vmcid: OMG  minor code: 1  completed: No
at com.ibm.CORBA.iiop.UtilDelegateImpl.mapSystemException(UtilDelegateImpl.java:313)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:84)
at com.ibm.rmi.util.ProxyUtil.copyObjects(ProxyUtil.java:282)
at com.ibm.CORBA.iiop.UtilDelegateImpl.copyObjects(UtilDelegateImpl.java:778)
at javax.rmi.CORBA.Util.copyObjects(Util.java:315)
at com.adobe.edc.policy._APSDocumentServicesManager_Stub.updatePolicy(_APSDocumentServicesManager_Stub.java:1675)
... 104 more
Caused by: org.omg.CORBA.NO_IMPLEMENT: The sender's class RMI:com.adobe.idp.dsc.um.lookup.datamodel.User:FFF00FCE963354D3:6A624FE97B2C45F1 is not present on the local classpath, and the class is not marked as truncatable, so it cannot be unmarshaled.  vmcid: OMG  minor code: 1  completed: No
at com.ibm.rmi.io.IIOPInputStream.inputObjectFVD(IIOPInputStream.java:1522)
at com.ibm.rmi.io.IIOPInputStream.simpleReadObjectInternal(IIOPInputStream.java:389)
at com.ibm.rmi.io.IIOPInputStream.simpleReadObjectLoop(IIOPInputStream.java:485)
at com.ibm.rmi.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:362)
at com.ibm.rmi.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:611)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:358)
at java.util.ArrayList.readObject(ArrayList.java:617)
at sun.reflect.GeneratedMethodAccessor385.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.ibm.rmi.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1693)
at com.ibm.rmi.io.IIOPInputStream.inputObjectUsingClassDesc(IIOPInputStream.java:1429)
at com.ibm.rmi.io.IIOPInputStream.inputObjectClassDesc(IIOPInputStream.java:1404)
at com.ibm.rmi.io.IIOPInputStream.readSerializable(IIOPInputStream.java:1133)
at com.ibm.rmi.io.IIOPInputStream.simpleReadObjectInternal(IIOPInputStream.java:402)
at com.ibm.rmi.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:438)
at com.ibm.rmi.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:210)
at com.ibm.rmi.iiop.CDRInputStream.read_value(CDRInputStream.java:1634)
at com.ibm.rmi.util.ProxyUtil.copyObjects(ProxyUtil.java:238)
... 107 more
Caused by: java.lang.ClassNotFoundException: com.adobe.idp.dsc.um.lookup.datamodel.User
at com.ibm.rmi.util.RepositoryId$ClassNameToClassCache.get(RepositoryId.java:167)
at com.ibm.rmi.util.RepositoryId.checkClassCache(RepositoryId.java:704)
at com.ibm.rmi.util.RepositoryId.getClassFromType(RepositoryId.java:693)
at com.ibm.rmi.iiop.CDRInputStream.fast_read_value(CDRInputStream.java:1766)
at com.ibm.rmi.iiop.CDRInputStream.fast_read_abstract_interface(CDRInputStream.java:1935)
at com.ibm.rmi.iiop.CDRInputStream.fast_read_abstract_interface(CDRInputStream.java:1921)
at com.ibm.rmi.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:345)
... 122 more

Any help on this?

Thanks

Diego

Message was edited by: Diego-Silva

5 Replies

Avatar

Former Community Member

Diego

I'm looking into this, but I think you may have come across a bug.  I believe that the Workbench UI is incorrect in showing the ability to populate the users via a variable.  I think that the only way that will work is to use "literal"

I will provide an update once I confirm.

Thanks

Steve

Avatar

Level 5

Hello Steve

I'm running the LC ES2 on WebSphere 6.1.0.21 with SQL Server 2005.

Microsoft Windows Server 2003 R2 x64 Edition SP2

Could be something related to Websphere? Because of this log:

[13/05/10 10:02:16:030 BRT] 00000047 AWS           E com.adobe.workflow.engine.PEUtil logFailedFaultRouting An exception was thrown with name com.adobe.edc.sdk.SDKException message:RemoteException occurred in server thread; nested exception is:
     java.rmi.RemoteException: CORBA NO_IMPLEMENT 0x4f4d0001 No; nested exception is:
     org.omg.CORBA.NO_IMPLEMENT: The sender's class RMI:com.adobe.idp.dsc.um.lookup.datamodel.User:FFF00FCE963354D3:6A624FE97B2C45F1 is not present on the local classpath, and the class is not marked as truncatable, so it cannot be unmarshaled.  vmcid: OMG  minor code: 1  completed: No -- Internal server error(error code bin: 1032, hex: 0x408) while invoking service RightsManagementService and operation updatePolicy and no fault routes were found to be configured.

Thanks for the quick response.

Diego

Avatar

Level 5

SOLVED!

I used the ExecuteScript to mount a list of PrincipalReference, the type that the UpdatePolicy operation expects.

import java.util.ArrayList;
import java.util.List;
import java.util.Properties;

import com.adobe.idp.dsc.clientsdk.ServiceClientFactory;
import com.adobe.idp.dsc.clientsdk.ServiceClientFactoryProperties;
import com.adobe.idp.um.api.UMException;
import com.adobe.idp.um.api.infomodel.Principal;
import com.adobe.idp.um.api.infomodel.impl.PrincipalReferenceImpl;
import com.adobe.livecycle.usermanager.client.DirectoryManagerServiceClient;
import com.adobe.idp.um.api.infomodel.PrincipalReference;


List aPrincipalReference = new ArrayList();
List idUsuarios = patExecContext.getProcessDataListValue("/process_data/listUsersId");

Properties connectionProps = new Properties();

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "iiop://0.0.0.0:2809");
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_EJB_PROTOCOL);
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE,ServiceClientFactoryProperties.DSC_WEBSPHERE_SERVER_TYPE);
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME,"administrator");
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD,"password");

//Create a ServiceClientFactory object
ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);

// Create an DirectoryManagerServiceClient object
DirectoryManagerServiceClient dirClient = new DirectoryManagerServiceClient(myFactory);          

for( int i = 0; i < idUsuarios.size(); i++ )
{
     PrincipalReference usuario = dirClient.findPrincipalReference(idUsuarios.get(i));     
     aPrincipalReference.add(usuario);     
}          

patExecContext.setProcessDataListValue("/process_data/listPrincipalReference",aPrincipalReference);

Diego

Avatar

Level 1

Diego,

Congratulations for your solution !!! Using your script, I´m trying to fix my process to update the policy after the Find User operation.  It seems have some errors on variable type definition.

Is it possible to send me your test application or tell me about envolved variable types?.

Thanks and Regards

Marcela Carvajal

mcarvajal@onsite.cl

Avatar

Level 5

Hello Marcela,


The test is the same as I posted above. I built a simple java application in eclipse and hard-coded the input data. When the code was OK I copied to execute script operation in LC workbench, and changed the appropriate variables.


What exactly would you like to know about the variable types?

Hope I can help

Diego