title: Hybris : Failed to lookup BaseSite for BusinessProcess [AbcCartEmailProcessModel (87976318374)]. Unable to setup session context
body: <p>I am trying to trigger email in hyrbis. For that i have written some code in respective context file.</p>
  
  <pre><code>public class AbcCartEmailContext extends AbstractEmailContext&lt;AbcCartEmailProcessModel&gt;
  {
  
  
  private final String myEmail = "tt@gmail.com";
  private final String fromEmail = "yy@abc.com";
  
  
  @Override
  public void init(final AbcCartEmailProcessModel businessProcessModel, final EmailPageModel emailPageModel)`{
      put(FROM_EMAIL, fromEmail);
      put(EMAIL, myEmail);
  }
  @Override
  protected BaseSiteModel getSite(final AbcCartEmailProcessModel businessProcessModel)
  {
      // YTODO Auto-generated method stub
      return ((StoreFrontProcessModel) businessProcessModel).getSite();
  }
  
  
  @Override
  protected CustomerModel getCustomer(final AbcCartEmailProcessModel businessProcessModel)
  {
      return ((StoreFrontCustomerProcessModel) businessProcessModel).getCustomer();
  }
  
      @Override
  protected LanguageModel getEmailLanguage(final AbcCartEmailProcessModel businessProcessModel)
  {
      // YTODO Auto-generated method stub
      return ((StoreFrontCustomerProcessModel) businessProcessModel).getLanguage();
  }
  }
  </code></pre>
  
  <p>Now when I try to kickoff mail with following lines of code in a method:</p>
  
  <pre><code>final AbcCartEmailProcessModel abcCartEmailProcess = (AbcCartEmailProcessModel) this.businessProcessService
              .createProcess("abcCartEmailProcess" + System.currentTimeMillis(), "abcCartEmailProcess");
      abcCartEmailProcess.setSite(baseSiteService.getCurrentBaseSite());
      abcCartEmailProcess.setLanguage(xyzService.getLanguage(MyConstants.DEFAULT_LANGUAGE));
      modelService.save(abcCartEmailProcess);
  this.businessProcessService.startProcess(abcCartEmailProcess);
  </code></pre>
  
  <p>I am getting following error:</p>
  
  <pre><code>ERROR [TaskExecutor-master-151-ProcessTask [879943539192]] [DefaultProcessContextResolutionStrategy] Failed to lookup BaseSite for BusinessProcess [AbcCartEmailProcessModel (8797633183742)]. Unable to setup session context.
  ERROR [TaskExecutor-master-151-ProcessTask [879943539192]] [DefaultProcessContextResolutionStrategy] Failed to lookup BaseSite for BusinessProcess [AbcCartEmailProcessModel (8797633183742)]. Unable to get content catalog.
  </code></pre>
  
  <p>What needs to be done to get rid of this error or to trigger email.</p>