setExternalNavigator 命令

Draft comment:
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-01-20 10:38
传统:
使用 setExternalNavigator 命令来配置 IBM® Business Automation Workflow 以使用外部 IBM Content Navigator

将使用 wsadmin 脚本编制客户机的 AdminTask 对象来运行 setExternalNavigator 命令。

先决条件

必须满足以下条件:

  • 在集群环境中,必须在 Deployment Manager 节点上运行此命令。 在非集群环境中,必须在独立服务器上运行此命令。
  • 如果 Deployment Manager 或独立服务器已停止,请使用 wsadmin -conntype none 选项以在断开连接方式(这是此命令的建议方式)下运行该命令。
注意Business Automation Workflow 只能配置一个外部 IBM Content Navigator

位置

profile_root/bin 目录启动 wsadmin 脚本编制客户机。 setExternalNavigator 命令不会写入到日志文件,但是 wsadmin 脚本编制客户机始终会编写 profile_root/logs/wsadmin.traceout 日志文件,您可在此日志文件中找到异常堆栈跟踪和其他信息。

语法

setExternalNavigator
[-de deployment_environment_name]
-icnUrl external_ICN_server_URL 
-icnAdminUser external_ICN_admin_user 
-icnAdminPassword external_ICN_admin_password
[-workflowWebServerURL web_server_URL] 
[-publicIcnURL public_ICN_URL]

参数

-de deployment_environment_name
此参数指定当前部署环境的名称。 如果 WebSphere® 单元中只有一个部署环境,则可以省略此参数。
-icnUrl 外部ICN服务器URL
指定 Content Navigator URL 的必需参数。 URL为 https://ICN_host:PORT/ICN_Context_Root ,必须使用 HTTPS访问。 例如,https://localhost:9443/navigator。 URL 是客户端用户在客户端浏览器中访问 Content Navigator 时使用的 URL。 如果客户端用户通过 Web 服务器(如 IBM HTTP Server (IHS)、负载均衡器或虚拟 IP)访问 Content Navigator ,则必须将 -icnUrl 值设置为 Web 服务器、负载均衡器或虚拟 IP URL。 当配置为防止跨源资源共享(CORS)错误时,客户端用户必须使用URL 访问 Content Navigator
要点: external_ICN_server_URL 值必须全部为小写,以防止 CORS 错误。 浏览器将输入的值规范化为小写。 但是,CORS 区分大小写,因此如果原始 URL 不是小写,那么您可能会收到与下面类似的错误:
Access to ... from origin 'https://myhostname.x.y.z:9444' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://myHostName.x.y.z:9444' that is not equal to the supplied origin.
-icnAdminUser 外部ICN管理员用户
必需参数,用于指定外部 IBM Content Navigator 管理员的用户名。
-icnAdminPassword 外部ICN管理员密码
必需参数,用于指定外部 IBM Content Navigator 管理员的密码。
-workflowWebServerURL web_server_URL

一个可选参数,用于配置从外部 IBM Content Navigator 服务器访问 IBM Business Automation Workflow 服务器的 URL 。 如果未指定此参数,那么将使用第一个应用程序集群成员 URL。 因此,当通过 IBM HTTP Server (IHS)、负载均衡器或虚拟IP等网络服务器访问 IBM Business Automation Workflow 服务器时,需要使用该参数。 该 URL 格式为 https://baw_web_server_host:baw_web_server_port

-publicIcnURL public_ICN_URL
一个可选参数,用于指定外部 Content Navigator URL。 如果您使用第三方身份验证提供商(如 WebSEAL 来访问外部 Content Navigator ,则需要填写此参数。 URL为 https://ICN_web_server_host:port/ICN_context_root

例如,https://icn_web_server_host:9443/navigator

示例

注: 这些示例仅用于说明目的。 它们包含变量值,并非意在作为代码片段重复使用。
以下 Jython 示例使用 setExternalNavigator 命令将 IBM Business Automation Workflow 配置为使用现有外部 IBM Content Navigator 服务器。
wsadmin -connType none -lang jython
wsadmin>print AdminTask.setExternalNavigator (['-de', 'De1', '-icnURL', 'https://icnserver:9443/navigator', '-icnAdminUser', 'ICNAdminUser', '-icnAdminPassword', 'adminpassword'])
wsadmin>AdminConfig.save()
下面的Jython示例使用 setExternalNavigator 命令配置 Business Automation Workflow ,使其使用现有的外部 Content Navigator 服务器,其中 Business Automation Workflow位于 HTTP https://bawhttpserver:443) 后面。
wsadmin -connType none -lang jython
wsadmin>print AdminTask.setExternalNavigator (['-de', 'De1', '-icnURL', 'https://icnserver:9443/navigator', '-icnAdminUser', 'ICNAdminUser', '-icnAdminPassword', 'adminpassword', '-workflowWebServerURL', 'https://bawhttpserver:443'])
wsadmin>AdminConfig.save()