如何从 SOAP Web 服务调用解锁 IBM 内容导航器中的对象

how to unlock objects in IBM content navigator from a SOA webservice call

在我的SOA中,有两个app来回交易文档信息。其中之一是 IBM 的 filenet/content navigator。现在,当这些文档在 filenet 中签出时,其他应用程序无法调用 filenet 中的文档。这通常可以通过手动登录到 Filenet 并右键单击文档并选择撤消签出来解决。

由于劫持确实影响了我的 SOA 集成,我希望能够通过我的 SOA 中的 Web 服务调用在 filenet 中执行此 "undo checkout" 操作。这将节省花费在手动操作解锁文档上的大量时间。我正在使用 Oracle 的 SOA 套件 11g(和 12c),并且我的流程大量使用 BPELs。我已经有一个很好的与 Filenet 交互的网络服务。但是,我将需要创建一个新操作 "UnlockDocument" 以在 filenet 中进行交互和执行此操作。

我需要什么: 我需要有代码来覆盖文件网环境中的 "UnlockDocument" 操作,或者一些类似的技巧来完成工作.非常欢迎任何关于我如何继续的信息(也是非代码!),如果我自己找到更多信息,我会继续更新我的 post!

感谢您的帮助!

杰斯珀

事实证明,在 filenet 的网络服务中不可能有 "UnlockDocument" 或 "CancelCheckout" 操作。但是,我找到了一个巧妙的解决方法,让您可以做到这一点。

当通过客户端或通过操作的 webservicecall 在 filenet 中签出文档时: "CheckoutAction"。 该文档的副本在 filenet 内部制作,与原始文档具有相同的 VersionSeriesId,但具有 属性 Isreserved = 'true'。如果您在此副本上执行 "DeleteAction",您实际上重新创建了 filenet 客户端中可用的手动 "Cancel Checkout" 步骤。 "DeleteAction" 需要 ObjectId 并且不适用于 VersionSeriesId。为了通过网络服务调用获取此 ObjectID,您需要创建一个获取此 ObjectID 的 SOAPCall。要取消初始签出,应该进行第二个 SOAPCall,删除在上一步中获得的文档 ObjectID,又名:"the copy"。以下是可用 SOAPCalls 的两个示例:

ExecuteSearchRequest SoapCall:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:sch="http://www.filenet.com/ns/fnce/2006/11/ws/schema">
   <soap:Header>
      <sch:Localization>
         <sch:Locale>en_EN</sch:Locale>
         <sch:Timezone/>
      </sch:Localization>
   </soap:Header>
   <soap:Body>
      <sch:ExecuteSearchRequest xsi:type="RepositorySearch" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <sch:SearchScope xsi:type="ObjectStoreScope" objectStore="ObjectStoreXXX"/>
         <sch:SearchSQL>SELECT [Id] FROM Document WHERE VersionSeries = {"enter the VersionSeriesID of the initial document without quotes"} AND IsReserved = true</sch:SearchSQL>
      </sch:ExecuteSearchRequest>
   </soap:Body>
</soap:Envelope>

DeleteActionRequest SoapCall:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:sch="http://www.filenet.com/ns/fnce/2006/11/ws/schema">
   <soap:Header>
      <sch:Localization>
         <sch:Locale>en-EN</sch:Locale>
         <sch:Timezone/>
      </sch:Localization>
   </soap:Header>
   <soap:Body>
      <sch:ExecuteChangesRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <sch:ChangeRequest>
            <sch:TargetSpecification classId="Document" objectId="{"enter the objectId of the previously obtained document without quotes"}" objectStore="ObjectStoreO7"/>
            <sch:Action xsi:type="sch:DeleteAction"/>
         </sch:ChangeRequest>
      </sch:ExecuteChangesRequest>
   </soap:Body>
</soap:Envelope>

现在为了让它在 SOA 中运行,您需要从 BPEL 中调用 filenet 的网络服务两次。首先是第一个操作:ExecuteSearchRequest,它会为您提供取消签出所需的 ObjectId,然后是第二个操作 ExecuteChangesRequest,它会删除正确的文档,撤消初始签出。这些操作列在上面的 SOAP 示例中。此外,您需要在传出的 header 中添加 WS-security 以及访问 Filenet 服务的工作凭据。否则无法连接filenet

这花费了我很多时间,所以我希望这对我以外的人有所帮助。享受您对 filenet 结帐删除的掌握!