WebSphere Commerce Enterprise

ScheduledContractDeploy URL

This URL is invoked by the WebSphere Commerce scheduler to deploy a contract. The Contract Import command imports a contract into the WebSphere Commerce database from an XML file. The schedule is created by the ContractDeploy URL. The ScheduledContractDeployCmd deploys the contract to active status at the expected scheduled time.

Feature Pack 7 or laterNote: For a consumer direct Aurora starter store, restart the WebSphere Commerce search server after you deploy a default contract. Otherwise, the new contract might not take effect on the storefront because the previous contract ID is cached on the WebSphere Commerce search server.

URL structure

http:// host_name/path/
The fully qualified name of your WebSphere Commerce Server and the configuration path.

Parameter values

setBrowsableAll
Required: A Boolean value which specifies whether the browsable product set information should be generated for all contracts.
contractId
Required: The contract ID for the contract being deployed, as found in the CONTRACT database table.
targetStoreId
Required: The ID of the store to which to deploy the contract.
setBrowsable
A Boolean value which specifies whether the browsable product set information should be generated for the specified contract.
URL
Required: The URL to be called when the command completes successfully.

Example

The following example deploys contractID 260369 to store 10011 and then points to the contract display page:


https://myhostname/webapp/wcs/stores/servlet/ScheduledContractDeploy?
contractId=260369&targetStoreId=10011&URL=StoreCatalogDisplay?storeId=512&catalogId=512

Behavior

  • This URL deploys a specified contract to a store, and generates optimization data for the contract's terms and conditions. A contract passes various states from the time it is created until the time it is deleted. The contract can be in draft or approved state before it is deployed. When it is deployed successfully it changes its state to active and will allow purchases against the contract.
  • The setBrowsable is set to true:
    • The process inclusion product sets finds the term and condition with type ProductSetTC and subtype ProductSetTCInclusion or ProductSetTCCustomInclusion. It creates the browsable product sets by using method processCatalogBrowsingProducSets of DeployProductSetFilterTCCmdImpl.
    • The process price finds the term and condition with type PriceTC, and gets all the inclusion product sets corresponding to the term and condition. It creates the browsable product sets by using method processCatalogBrowsingProductSets of DeployProductsSetFilterTCCmdImpl.

Exception conditions

  • _ERR_CONTRACT_OBJECT_NOT_FOUND will be thrown if a contract with the specified contract ID is not found in the WebSphere Commerce database.
  • _ERR_WRONG_CONTRACT_STATE will be thrown if the contract is in the DeploymentInProgress or DeploymentFailed state.
  • Some exceptions might be logged in the SystemOut.log file. For example:

    [4/19/07 5:57:37:144 GMT+08:00] 0000003b CommerceSrvr E com.ibm.commerce.contract.commands.DeployContractProcess doJobUpdateSuccessful CMN0409E: The following error has occurred during processing: null.java.lang.NullPointerException at com.ibm.commerce.contract.commands.DeployContractProcess.doJobUpdateSuccessful(DeployContractProcess.java:185) at com.ibm.commerce.contract.commands.DeployContractProcess.run(DeployContractProcess.java:243) at com.ibm.commerce.scheduler.SchedulerThread.process(SchedulerThread.java(Compiled Code)) at com.ibm.commerce.scheduler.SchedulerSecurityPriviledgedAction.run(SchedulerSecurityPriviledgedAction.java:59) at com.ibm.commerce.scheduler.SchedulerThread.run(SchedulerThread.java:125) [4/19/07 5:57:37:159 GMT+08:00] 0000003b ExceptionUtil E CNTR0019E: EJB threw an unexpected (non-declared) exception during invocation of method "create". Exception data: com.ibm.ejs.container.CreateFailureException: ; nested exception is: java.lang.NullPointerException

    You can safely ignore these errors.